使用HQL查询所有部门信息,以下正确的是()。
第1题:
根据SQL标准,查询表student(sno,sname,sex,dept)中所有学生的选修课程数,其中选修记录在表SC(sno,cno,grade)中,两表中sno为关联字段。下面哪条语句合适?()
A select sno,count(cno) from SC
B select sno,count(cno) from student
C select a.sno,count(cno) from student a left outer join SC
D select a.sno,count(cno) from SC left outer join student a
第2题:
在学生表STUD中查询所有姓张的学生的信息,使用的SQL语句是______。
A.SELECT * FROM STUD WHERE 姓名LIKE“张%”
B.SELECT * FROM STUD WHERE 姓名IN(“张%”)
C.SELECT * FROM STUD WHERE 姓名LIKE“张$”
D.SELECT * FROM STUD WHERE 姓名IN(“张$)”
第3题:
查询全体主管的姓名(m name)、出生年份(birth)和所在部门(dept),要求用小写字母表示所有部门名,数据表名为manager实现该功能的语句为________。
A.select"m_name",出生年份:,birth,islower(dept)from manager
B.select m_name,"出生年份:",birth,islower(dept)from manager
C.select m_name,"出生年份:",birth,dept from manager
D.select m_name,"出生年份:",birth,upper(dept)from manager
第4题:
对于学生信息表:student(sno,sname,sex,age,dept),要查询所有刘姓学生的信息,正确的语句是
A.SELECT * FROM student WHERE sname LIKE'刘 * '
B.SELECT * FROM student WHERE sname LIKE'刘 $'
C.SELECT * FROM student WHERE sname LIKE'刘%'
D.SELECT * FROM student WHERE sname LIKE'刘&'
第5题:
第6题:
关于HQL的聚合函数使用,说法正确的是()。
第7题:
查询student表中的所有非空email信息,以下语句正确的是()。
第8题:
语句SELECT * FROM dept WHERE NOT EXISTS (SELECT * FROM emp WHERE deptno=dept.deptno)执行后的结果为()
第9题:
Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) Which statement produces the number of different departments that have employees with last name Smith?()
第10题:
Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHARD2(30) SALARY NUMBER(8,2) Which statement shows the maximum salary paid in each job category of each department?()
第11题:
Examine the structure of the EMP_DEPT_VU view: Column Name Type Remarks EMPLOYEE_ID NUMBER From the EMPLOYEES table EMP_NAME VARCHAR2(30) From the EMPLOYEES table JOB_ID VARCHAR2(20) From the EMPLOYEES table SALARY NUMBER From the EMPLOYEES table DEPARTMENT_ID NUMBER From the DEPARTMENTS table DEPT_NAME VARCHAR2(30) From the DEPARTMENTS table Which SQL statement produces an error?()
第12题:
String hql = from com.hr.g3.persist.dept as model;
String hql = from com.hr.g3.persist.Dept ;
String hql = from Dept as model;
String hql = from dept ;
第13题:
Examine the description of the EMPLOYEES table:EMP_ID NUMBER(4) NOT NULLLAST_NAME VARCHAR2(30) NOT NULLFIRST_NAME VARCHAR2(30)DEPT_ID NUMBER(2)JOB_CAT VARCHARD2(30)SALARY NUMBER(8,2)Which statement shows the maximum salary paid in each job category of each department? ()
A. SELECT dept_id, job_cat, MAX(salary) FROM employees WHERE salary > MAX (salary);
B. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id,job_cat;
C. SELECT dept_id, job_cat, MAX(salary) FROM employees;
D. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept_id;
E. SELECT dept_id, job_cat, MAX(salary) FROM employees GROUP BY dept _ id job _ cat salary;
第14题:
下图是使用查询设计器完成的查询,与该查询等价的SQL语句是 ______。

A.select学号,数学from sc where 数学>(select avg(数学)from sC)
B.select学号where数学>(select avg(数学)from sC)
C.select数学avg(数学)from sc
D.select数学>(select avg(数学)from sC)
第15题:
在问题1定义的视图D_S上,下面哪个查询或更新是允许执行的,为什么?
(1)Update D_S set D-3 where D=4;
(2)Delete from D_Swhere C>4;
(3)Select D,Averages from D_S
where C>(Select C from D_S where D=:dept);
(4)Select D,C From D_S
where Totals>10000;
(5)Select*from D_S;
第16题:
A.SELECT UNIQUE dept FROM staff
B.SELECT DISTINCT dept FROM staff
C.SELECT (dept) UNIQUE FROM staff
D.SELECT (dept) DISTINCT FROM staff
第17题:
在Hibernate的HQL查询中,有数据库表(dept)对应的对象名称为Dept,下列HQL写法正确的有()
第18题:
数据库表account对应实体类为Account类,以下HQL语句错误的有()。
第19题:
Which of the following statements eliminates all but one of each set of duplicate rows in the DEPT column in the STAFF table?()
第20题:
查询student表中的所有非空email信息,以下语句正确的是()
第21题:
当需要查询日志文件所有组及其成员的名称和文件位置,可以使用()方式。
第22题:
Examine the structure of the EMP_DEPT_VU view: Column Name Type Remarks EMPLOYEE_ID NUMBER From the EMPLOYEES table EMP_NAME VARCHAR2(30) From the EMPLOYEES table JOB_ID VARCHAR2(20) From the EMPLOYEES table SALARY NUMBER From the EMPLOYEES table DEPARTMENT_ID NUMBER From the DEPARTMENTS table DEPT_NAME VARCHAR2(30) From the DEPARTMENTS table Which SQL statement produces an error?()
第23题:
from Dept
select*from cn.jbit.demo.entity.Dept
select Dept from cn.jbit.demo.entity.Dept d
select d from Dept d