运算符
AND 运算符
带有 WHERE
字句的 AND
运算符语法如下
SELECT column1, column2, ... columnN
FROM table_name
WHERE [condtion1] AND [condition2] ... AND [conditionN];
当满足 AND
连接的所有条件时,对应的列才会被选出来
OR 运算符
带有 WHERE
子句的 OR
运算符语法如下
SELECT column1, column2, ... columnN
FROM table_name
WHERE [condition1] OR [condition2] ... OR [conditionN];
当满足 OR
连接的任意一个条件时,对应的列就会被选出来
语句
UPDATE 语句
带有 WHERE
子句的 UPDATE
查询的基本语法如下
UPDATE table_name
SET column1 = value1, column2 = value2, ... columnN = valueN
WHERE [condition];
UPDATE
实现了对数据的修改,通过 WHERE
子句可以修改特定的数据。
如果要修改所有数据,可以去掉 WHERE
子句
UPDATE table_name
SET column1 = value1, column2 = value2, ... columnN = valueN
DELETE 语句
带有 WHERE
子句的 DELETE
查询的基本语法如下
DELETE FROM table_name
WHERE [condition]
DELETE
语句实现了对数据的删除。
如果需要删除所有数据,可以去掉 WHERE
子句
DELETE FROM table_name
标签:SQLite,UPDATE,运算符,子句,table,WHERE,DELETE
From: https://www.cnblogs.com/Gensokyo-Alice/p/17741493.html