SQL語句包括兩個部分:1 DDL 資料定義語言 2 DML 資料控制語言
DDL:
create:建立一個表
create table b(
clob char(1)
);
alter:增加已經定義的表列的配置設定
drop:删除一個表
desc:檢視一個表的定義
DML:
selelct:
select * from b;
insert:
insert into state values('fds','fds');
update:修改已有的資料
delete:删除已有的資料
帶or/and的where子句:
select a,b,c from tablename where a='111',and b='222';
select a,b,c from tablename where a='111',or b ='222';
帶not的where子句
select a,b,c from tablename where a != 1;
帶搜尋範圍的where子句
select a,b,c from tablename where b between 1 and 19;
帶搜尋清單的where子句
select a,b,c from tablename where a in ('1','2');
帶模式搜尋的where子句
select a,b,c from tablename where a like 'a%';