SELECT column_name,column_name
FROM table_name
[WHERE Clause][LIMIT N][OFFSET M]
使用limit属性来设定返回的记录数
通过OFFSET指定SELECT语句开始查询的数据偏移量。默认情况下偏移量为0.
WHERE子句
SELECT field1,field2,...fieldN from table_name1,table_name2...[WHERE condition1 [AND[OR]] condition2......]select 查询列表 from 表明 where 筛选条件;
UPDATE更新
UPDATE table_name SET field1=new-value1,fields=new-value2
[WHERE Clause]
--例:列出不是由供应商1003制造的所有产品select vend_id,prod_name
from products
where vend_id <>1003;
--范围值检查select prod_name,prod_price
from products
where prod_price between5and10;
DELETE语句
DELETEFROM table_name [WHERE CLause]
LIKE子句模糊查询
SELECT field1,field2,...fieldN
FROM table_name
WHERE field1 LIKE condition1 [AND[OR]] field2='somevalue'%通配任意字符
_通配单一字符
--例: SELECT*from runoob_tb1 WHERE runoob_author LIKE'%COM';