select * from emp where hiredate>='19820101';
select * from emp where hiredate>=to_char('19820101','YYYYMMDD');
select * from emp where to_date(hiredate,'YYYYMMDD')>='19820101';
select * from emp where to_char(hiredate,'YYYYMMDD')>='19820101';
第1题:
第2题:
查询出EMP表中1982年及以后入职的员工信息()(注:字段hiredate为入职日期,数据类型为DATE型)
第3题:
数据库中有一张表名为Emp,包含有如下列:EmpNO(雇员编号,Varchar(20),Pk),Job(职位Varchar(10)),HirDate(雇佣日期,Date),Sal(月薪,Float),Comm(奖金,Float,可为空)。查询出雇员编号不为791,792,793的雇员信息应该是用哪些数据查询?()
第4题:
数据库中有一张表名为Emp,包含有如下列:EmpNO(雇员编号,Varchar(20),Pk),Job(职位Varchar(10)),HirDate(雇佣日期,Date),Sal(月薪,Float)。查询出职位不为“办事员”的雇员信息是()
第5题:
数据库中有一张表名为Emp,包含有如下列:EmpNO(雇员编号,Varchar(20),Pk),Job(职位Varchar(10)),HirDate(雇佣日期,Date),Sal(月薪,Float),Comm(奖金,Float,可为空)。查询出雇员编号为791,792,793的雇员信息是()
第6题:
You need to display the last names of those employees who have the letter "A" as the second character in their names. Which SQL statement displays the required results? ()
第7题:
The EMP table has these columns: ENAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATE Management wants a list of names of employees who have been with the company for more than five years. Which SQL statement displays the required results? ()
第8题:
You need to create a view EMP_VU. The view should allow the users to manipulate the records of only the employees that are working for departments 10 or 20. Which SQL statement would you use to create the view EMP_VU? ()
第9题:
列出EMP表中,从事每个工种(JOB)的员工人数()
第10题:
select * from emp where comm='';
select * from emp where comm=null;
select * from emp where nvl(comm)=0;
select * from emp where comm is null;
select * from emp where nvl(comm,0)=0;
第11题:
CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);
CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;
CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;
CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);
CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;
第12题:
( 难度:中等)以下哪些Mysql语句是正确的?
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;
E.select * from where deptno=1 group by sal;
答案:ABD
第13题:
关于HQL的聚合函数使用,说法正确的是()。
第14题:
语句SELECT * FROM dept WHERE NOT EXISTS (SELECT * FROM emp WHERE deptno=dept.deptno)执行后的结果为()
第15题:
数据库中有一张表名为Emp,包含有如下列:EmpNO(雇员编号,Varchar(20),Pk),Job(职位Varchar(10)),HirDate(雇佣日期,Date),Sal(月薪,Float)。要求查询全部雇员信息应该是哪些数据?()
第16题:
数据库中有一张表名为Emp,包含有如下列:EmpNO(雇员编号,Varchar(20),Pk),Job(职位Varchar(10)),HirDate(雇佣日期,Date),Sal(月薪,Float)。查询出受雇于1981年的雇员信息是()
第17题:
You need to create a view EMP_VU. The view should allow the users to manipulate the records of only the employees that are working for departments 10 or 20.Which SQL statement would you use to create the view EMP_VU?()
第18题:
查询出所有名字以’S’开始的员工()
第19题:
限制从EMP表中只选出前5条记录的查语句为()。
第20题:
Which SQL statement returns a numeric value?()
第21题:
select count(*) from Dept d用于统计部门个数
select sum(e.salary) from Emp e用于汇总员工工资总额
select max(e.hiredate) from Emp e用于找到最新入职的员工的入职时间
select min(e.hiredate) from Emp e用于找到最早入职的员工的入职时间
第22题:
CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department _ id IN (10,20);
CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;
CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;
CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WITH department_id IN (10,20);
CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;
第23题:
Exhibit A
Exhibit B
The query returns no rows
The query fails because the outer query is retrieving more than one column
The query fails because both the inner and outer queries are retrieving data from the same table.