Sql语句:数据操作

数据操作,核心是:增删改查。

其中查与增删改不同,要返回数据集,其他的只要知道是否修改成功即可,所以一般调用时,返回值不同,这点要注意。

一、查询:

select sname,sdept,sage 
from student 
where ssex = '男' or ssex = '女' and sage not between 20 and 23

select distinct sno 
from sc 
where cno between '1'and '2'

这里有两种返回值:
1、查询一般要第一种结果

2、增删改用这种就可以了

posted @ 2025-03-28 09:28  嘉君  阅读(9)  评论(0)    收藏  举报