下列语句有语法错误的是( )
A: declare @myvar int
B: select * from students
C: select @myvar=100
D: delete * from score
A: declare @myvar int
B: select * from students
C: select @myvar=100
D: delete * from score
举一反三
- 下列的查询语句哪一项是错误的(选一项) A: Select * from stumarks where score>=60 B: Select * from (select * from stumarks where score>=60) C: Select * from (select * from stumarks where score>=60) as temp D: Select * from (select * from stumarks ) as temp where score>=60
- 下列选项中,能够按照 score 由高到低显示 student 表中记录的 SQL 语句是 A: SELECT* FROM student ORDER BY score ; B: SELECT* FROM student ORDER BY score ASC ; C: SELECT * FROM student ORDER BY score DESC ; D: SELECT* FROM student GROUP BY score DESC ;
- 要从SC表中查找缺成绩(SCORE)的学生学号(NO),相应的SQL语句是( )。 A: SELECT NO FROM SC WHERE SCORE = 0 B: SELECT NO FROM SC WHERE SCORE IS 'NULL' C: SELECT NO FROM SC WHERE SCORE = NULL D: SELECT NO FROM SC WHERE SCORE IS NULL
- 在MySQL中,查看学生表Students表中的姓名Sname属性的SQL语句表达正确的是( )。 A: SELECT * FROM Students B: SELECT * FROM Students WHERE Sname="" C: SELECT Sname FROM Students D: SELECT Sname FROM Students WHERE Sname=""
- 根据关系模型Students(学号,姓名,性别,专业,成绩),统计学生的平均成绩应使用的SQL语句是______。 A: SELECT AVG(成绩)FROM Students B: SELECT COUNT(成绩) FROM Students C: SELECT COUNT(*) FROM Students D: SELECT AVG(*) FROM Students