这:
create table cartao(
_id integer primary autoincrement,
nome text not null
);
create table vacina(
_id integer primary autoincrement,
idCartao long not null,
nome text not null,
descricao text not null
);
create table remedio(
_id integer primary autoincrement,
nome text not null
);
SELECT * FROM CARTAO;
返回以下错误:
错误:接近"自动增量":语法错误
答案 0 :(得分:1)
[关闭主题]在SQLite中, select listing.lid
, sum(review.rNumber) as nor
, count(review.rNumber) as total
, users.username from listing
left join review on listing.lid=review.lID
inner join users on users.uid=listing.cuid
where
cat='Hair
group by listing.lid,users.username
没有AUTOINCREMENT
就可以了
You forgot KEY
after PRIMARY
:
应该是 _
SQLite(SQL.js)架构设置:
_id integer primary key autoincrement
查询1 :
create table cartao(_id integer primary key autoincrement, nome text not null);
Insert into cartao(nome) Values('test 1'),('test 2');
<强> Results 强>:
SELECT * FROM CARTAO
答案 1 :(得分:-2)
使用 AUTO_INCREMENT 代替查询中的自动增量