使用SQLite需要注意以下几点:
(1)建表时为避免重复操作,应加上IF NOT EXISTS关键词。
(2)删表时为避免重复操作,应加上IF EXISTS关键词。
(3)添加新列时使用ALTER TABLE table_name ADD COLUMN …。
(4)在SQLite中,ALTER语句每次只能添加一列。
(5)SQLite不支持布尔类型。可通过整型数用0表示false,1表示true。
(6)SQLite建表时需要一个唯一标识字段,字段名为_id。
(7)条件语句等号后面的字符串值要用单引号括起来。
SQLite注意以下几点
最新推荐文章于 2022-03-01 16:59:00 发布