我使用APSW将我的SQL代码包装成python,如下所示:
connection=apsw.Connection("dbfile"); cursor=connection.cursor()
cursor.execute("create table foo(x,y,z)")
cursor.execute("create table bar(a,b,c)")
cursor.execute("create table baz(one,two,three)")
我计划使用gui框架来显示这些表名(以及随后的列和行)。我还想按不同的标准对这些表名进行排序。你知道吗
有没有一种方法可以在表本身上创建一个用于排序的索引--例如:
cursor.execute("CREATE INDEX index_name ON foo")
提前谢谢。你知道吗
You can list all the tables在sqlite数据库中
一旦有了表名,就可以使用字符串格式来形成
CREATE INDEX
命令。你知道吗除了@unutbu answer,还有^{} function :
它返回单个表的信息。你知道吗
相关问题 更多 >
编程相关推荐