在MySQL中,要查找课程表Courses中课程名cname以“数据”开头(如数据结构、数据库系统等)的所有课程记录,下列SQL语句表示正确的是( )。
A: select * from Courses where cname like “数据”;
B: select * from Courses where cname like“%数据”;
C: select * from Courses where cnamr like “数据%”;
D: select * from Courses where cnamr like “%数据%”;
A: select * from Courses where cname like “数据”;
B: select * from Courses where cname like“%数据”;
C: select * from Courses where cnamr like “数据%”;
D: select * from Courses where cnamr like “%数据%”;
举一反三
- Hive中的谓词like用于匹配特定的子串,能从courses表中查询书名包含,包含“大数据”的课程信息的是:( ) A: select * from courses where Cname like '%大数据%' B: select * from courses where Cname like '%大%数%据%' C: select * from courses where Cname like '_大_数_据_' D: select * from courses where Cname like '_大数据_'
- 以下______SQL语句可以查询出课程名中只包含“C_数据”字符串的课程信息。( ) A: SELECT * FROM cj_table WHERE CNAME LIKE '%C\_数据%'; B: SELECT * FROM cj_table WHERE CNAME LIKE '%C*_数据%' ESCAPE '*'; C: SELECT * FROM cj_table WHERE CNAME LIKE '%C D: _数据%' ESCAPE ' E: '; F: SELECT * FROM cj_table WHERE CNAME LIKE '%C?_数据%' ESCAPE '?';
- 下列语句()能够查询所有英语类课程的信息。 A: SELECT * FROM Course WHERE cname LIKE ‘%英语’ B: SELECT * FROM Course WHERE cname LIKE ‘%英语%’ C: SELECT * FROM Course WHERE cname LIKE ‘_英语_’ D: SELECT * FROM Course WHERE cname LIKE ‘*英语*’
- 以下( )SQL语句可以查询出课程名中只包含“_design”字符串的课程信息。 A: select * from course where cname like '%_design%' B: select * from course where cname like '%\_design%' escape '\' C: select * from course where cname like '% D: _design%' escape ' E: ' F: select * from course where cname like '%*_design%' escape '*'
- 在KCB表中找出名字中包含“原理”两个字的课程,对应的SQL命令是()。 A: SELECT * FROM KCB WHERE 课程名 = ’原理’ B: SELECT * FROM KCB WHERE课程名LIKE ’%原理’ C: SELECT * FROM KCB WHERE课程名LIKE ’原理%’ D: SELECT * FROM KCB WHERE课程名LIKE ’%原理%’