下面的查询中哪一个会产生笛卡尔集()
第1题:
根据SQL标准,要查询表student中平均年龄age小于21的所在系dept及其平均年龄值,下面哪条语句适用?()
A select dept,avg(age) from student where avg(age)<21
B select dept,avg(age) from student group by dept having avg(age)<21
C select dept,avg(age) from student having avg(age)<21
D select dept,avg(age) from student group by dept where avg(age)<21
第2题:
A.SELECT UNIQUE dept FROM staff
B.SELECT DISTINCT dept FROM staff
C.SELECT (dept) UNIQUE FROM staff
D.SELECT (dept) DISTINCT FROM staff
第3题:
以下语句不正确的是( )
A.select * from emp;
B.select ename,hiredate,sal from emp;
C.select * from emp order deptno;
D.select * from where deptno=1 and sal<300;
第4题:
第5题:
A.SELECT TOP 5 * FROM EMP
B.SELECT DISTINCT 5 * FROM EMP
C.SELECT * FROM EMP WHERE ROWNUM<6
D.SELECT * FROM EMP WHERE ROWNUM=5
第6题:
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;
第7题:
A.select job from emp;
B.select job,count(*) from emp;
C.select distinct job,count(*) from emp;
D.select job,count(*) from emp group by job;
E.select job,sum(empno) from emp group by job;
第8题:
A. DROP emp_dept_uv;
B. DELETE emp_dept_uv;
C. REMOVE emp_dept_uv;
D. DROP VIEW emp_dept_uv;
E. DELETE VIEW emp_dept_uv;
F. REMOVE VIEW emp_dept_uv;
第9题:
第10题:
使用HQL查询所有部门信息,以下正确的是()。