以前的项目一直都是在用MSSql、Oracle、MySql、Access等数据库,但是这些数据库对服务器多少会有一些依赖,所以想试一下SQLLite;
sqllite和其它数据库的SQL语法有些差异,所以列在这里备忘。本人测试的时候,用的是sqllite3.4
drop table if exists Abouttab;--直接Exists表名就行了
create table if not exists Abouttab(
Id integer primary key autoincrement,
Info text null,
Lan integer
)
create table if exists Abouttab这一句因为是在drop table的后面,本来是保证表一定不存在的,也就是说可以直接写成create table Abouttab..的,加上if exists Abouttab只是为了以后看到的时候,知道这里可以这样子写