SQL语句题概要.doc

SQL语句题概要

在成绩表中,效率60分为不及格,大于60分为及格,大于80分为优秀,请用一条SQL语句查询。 答:设有成绩表Scores 包含字段ScoreId Score 查询语句如下: Select 成绩=case When score between(0 and 59) then ‘不及格’ When score between(60 and 79) then ‘及格’ When score between(80 and 100) then ‘优秀’ Else ‘无效成绩’ End From Score 请用SQL语句查处当天所有记录. 答: select * from tb_send where datediff(day,sendTime, getdate())=0 sql查询,表table(id,lastUpdateDate);使用一条sql语句查出最近一次的修改时间 答:select top 1 lastUpdateDate from [table] order by lastUpdateDate desc 游标的声明与使用,如何判断记录已到达最末尾 declare @myCur Cursor declare mySet Cursor for select

文档评论(0)

1亿VIP精品文档

相关文档