hpareek

insert TABLE

Jun 7th, 2017
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1.     >>> conn = sqlite3.connect(':memory:')
  2.     >>> c = conn.cursor()
  3.     >>> c.execute("CREATE table raman(ATOMIC NUMBER INT, SYMBOL TEXT, ROW INT , COLUMN INT)")
  4.     <sqlite3.Cursor object at 0x000000000296E490>
  5.     >>> c.execute("INSERT INTO raman VALUES(1,'H',1,'1')");
  6.     <sqlite3.Cursor object at 0x000000000296E490>
  7.     >>> conn.commit()
  8.     >>> for row in c.execute('SELECT * FROM raman'):
  9.     ...     row
  10.     ...
  11.     (1, 'H', 1, 1)
Add Comment
Please, Sign In to add comment