sqlite下查找表名是否存在的语句

0 个评论
select name from sqlite_master where type = 'table' and name = 'table_name'
2010-01-21 / 数据库技术 / 39 views浏览
阅读全文

Sqlite下得到列名的方法

0 个评论
1.通过下面的语句得到表的创建语句 select sql from sqlite_master where type = 'table' and tbl_name = 'table_name'; 其中table_name是你要替换掉的表名 2.通过分析sql语句得到各列的名称. 下面是python下的一段分析代码: def isTableExist(self, table_name): sql = """select name from sqlite_mas...
2010-01-21 / 数据库技术 / 48 views浏览
阅读全文