【正文】
該語句將刪除學(xué)生表中所有姓名為 ‘王五 ’ 的記錄 注意: Delete from student 將刪除學(xué)生表中所有記錄 。 delete from 表名 where 條件 例:從名單中刪除 ‘ 王五 ’ Delete from student where sname= 39。微機(jī) 87239。男 39。王五 39。87020339。 INSERT INTO 表名 (字段列表 ) values (值列表 ) 例:增加新的成績 Insert into Curse (sno,ame,score) values (‘870102’,’數(shù)據(jù)結(jié)構(gòu) ’ ,75) insert into語句 向表中增加新的數(shù)據(jù) 。 Select sum(score) as t_score from Curse where sno=‘870101’ MAX (字段名或表達(dá)式 )、 MIN (字段名或表達(dá)式 ):求最大 、最小值 BETWEEN...AND 決定某一數(shù)值是否介于特定的范圍之內(nèi) 例:查詢年齡在 1820歲之間的學(xué)生 Select * from student where sold BETWEEN 25 AND 30 等價(jià)于: Select * from student where sold=25 AND sold=30 數(shù)據(jù)更新語句 ? Update: 更新表中已有的數(shù)據(jù) ? Insert into: 向表添加新的數(shù)據(jù) ? Delete From: 刪除表中的記錄 update語句 更新指定條件的數(shù)據(jù) 。 Select * from student order by SNAME Select , , , from Student a,Curse b where = order by , DESC SQL的特殊操作 ? IN 操作符 ? LIKE 操作符 ? SQL 的運(yùn)算符及表達(dá)式 ? SQL 的統(tǒng)計(jì)函數(shù) ? Between … and 運(yùn)算符 ? Union 操作 ? INNER JOIN操作 in操作符 ? 用在 where后 ,當(dāng)同時(shí)查詢多個(gè)條件時(shí) ,用以簡化寫法 Select * from student where SNAME in (‘李明 ’ ,‘ 成功 ’ ) 等價(jià) SQL語句 : Select * from student where SNAME =‘李明 ’ or SNAME =‘成功 ’ ? 多層 SQL查詢 like操作符 實(shí)現(xiàn)模糊查詢 。 predicate ALL,DISTINCT, DISTINCTROW,TOP n