1,判断表是否存在:
SELECT name, sql FROM sqlite_master WHERE type="table" AND name = "Dom"
结果如下:
2.判断视图是否存在:
SELECT count(*) FROM sqlite_master WHERE type = "view" AND name = "myView"
结果如下:
type=‘view‘判断视图.结果>0就是有这个视图
时间: 2024-10-02 10:18:25
1,判断表是否存在:
SELECT name, sql FROM sqlite_master WHERE type="table" AND name = "Dom"
结果如下:
2.判断视图是否存在:
SELECT count(*) FROM sqlite_master WHERE type = "view" AND name = "myView"
结果如下:
type=‘view‘判断视图.结果>0就是有这个视图