sqlite3.OperationalError: near ".": syntax error

luofeiyu elearn2014 at gmail.com
Fri Sep 19 04:05:03 EDT 2014


     C:\Users\pengsir>sqlite3 F:\\workspace\\china\\data\\china.sqlite
     SQLite version 3.8.5 2014-06-04 14:06:34
     Enter ".help" for usage hints.
     sqlite> .tables
     balance   cash      fi_di     ipo       profile   quote
     capital   dividend  fund      majority  profit
     sqlite>

     import slqite3
     con = sqlite3.connect('F:\\workspace\\china\\data\\china.sqlite')
     cur = con.cursor()
     cur.execute('.tables')


     Traceback (most recent call last):
       File "<stdin>", line 1, in <module>
     sqlite3.OperationalError: near ".": syntax error


why  can't get the  right tables  in  "  cur.execute('.tables')"  ?



More information about the Python-list mailing list