UPDATE and DELETE – SQLite3 with Python 3 | Lecture 18
Source Code import sqlite3 db = sqlite3.connect('ganesha.db') cursor = db.cursor() id1=2 name1 = 'AAA' # cursor.execute('update info3 set name = ? where id = ?',(name1,id1)) cursor.execute('delete from info3 where id = ?',(id1,)) db.commit()...
Read from (SELECT) Database table – SQLite3 with Python 3
Source Code import sqlite3 db = sqlite3.connect('ganesha.db') cursor = db.cursor() id1 = 2 cursor.execute('select *from info3 where id=?',(id1,)) multiplerecord = cursor.fetchall() # print(singlerecord[1]) for row in multiplerecord: # print(row)...
insert python variable values in database table
How to insert data in Table using Python 1.? Placeholder 2.Using python tuple and keyname placeholder import sqlite3 db = sqlite3.connect('ganesha.db') id1 = 1 name1= 'yogesh' id2 = 2 name = 'vikas' cursor = db.cursor() # ? Placeholder # cursor.execute('insert into...
apache pig language introduction
PIG Introduction Big is an Apache open source project pig works on MapReduce and hdfs and the script that we will read write to perform data analysis is called pig Latin. PIG is capable to read data from local file system and hdfs and able to write output data on hdfs...