网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
查询出EMP表中1982年及以后入职的员工信息()(注:字段hiredate为入职日期,数据类型为DATE型)
A
select * from emp where hiredate>='19820101';
B
select * from emp where hiredate>=to_char('19820101','YYYYMMDD');
C
select * from emp where to_date(hiredate,'YYYYMMDD')>='19820101';
D
select * from emp where to_char(hiredate,'YYYYMMDD')>='19820101';
参考答案
参考解析
解析:
暂无解析
更多 “单选题查询出EMP表中1982年及以后入职的员工信息()(注:字段hiredate为入职日期,数据类型为DATE型)A select * from emp where hiredate='19820101';B select * from emp where hiredate=to_char('19820101','YYYYMMDD');C select * from emp where to_date(hiredate,'YYYYMMDD')='19820101';D select * from emp where to_char(hiredate,'YYYYMMDD')='19820101';” 相关考题
考题
以下语句不正确的是( )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
考题
The EMP table has these columns:ENAME VARCHAR2(35)SALARY NUMBER(8,2)HIRE_DATE DATEManagement 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? ()A. SELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE 5;B. SELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE 5;C. SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)/365 5;D. SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)*/365 5;
考题
列出EMP表中,从事每个工种(JOB)的员工人数()
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;
考题
限制从EMP表中只选出前5条记录的查语句为()。
A.SELECT TOP 5 * FROM EMPB.SELECT DISTINCT 5 * FROM EMPC.SELECT * FROM EMP WHERE ROWNUM6D.SELECT * FROM EMP WHERE ROWNUM=5
考题
找出emp表中的dept表没有的dept_no 使用Exists方式实现 即改写select * from emp a where a.dept_no not in (select b.dept_no from dept b)
考题
关于HQL的聚合函数使用,说法正确的是()。A、select count(*) from Dept d用于统计部门个数B、select sum(e.salary) from Emp e用于汇总员工工资总额C、select max(e.hiredate) from Emp e用于找到最新入职的员工的入职时间D、select min(e.hiredate) from Emp e用于找到最早入职的员工的入职时间
考题
查询出EMP表中1982年及以后入职的员工信息()(注:字段hiredate为入职日期,数据类型为DATE型)A、select * from emp where hiredate='19820101';B、select * from emp where hiredate=to_char('19820101','YYYYMMDD');C、select * from emp where to_date(hiredate,'YYYYMMDD')='19820101';D、select * from emp where to_char(hiredate,'YYYYMMDD')='19820101';
考题
语句SELECT * FROM dept WHERE NOT EXISTS (SELECT * FROM emp WHERE deptno=dept.deptno)执行后的结果为()A、只显示存在于EMP表中的部门全部信息B、只显示不存在于EMP表中的部门全部信息C、未返回任何数据D、显示DEPT表中的全部信息
考题
数据库中有一张表名为Emp,包含有如下列:EmpNO(雇员编号,Varchar(20),Pk),Job(职位Varchar(10)),HirDate(雇佣日期,Date),Sal(月薪,Float),Comm(奖金,Float,可为空)。查询出雇员编号不为791,792,793的雇员信息应该是用哪些数据查询?()A、Select * From Emp Where EmpNO Not In('791','792','793')B、Select * From Emp Where EmpNO !='791' AND EmpNO!='792' And EmpNO='793'C、Select * From Emp Where EmpNO '791' AND EmpNO792' And EmpNO=793'D、Select * From Emp Where EmpNO =!'791' AND EmpNO =!'792' And EmpNO =!'793'
考题
数据库中有一张表名为Emp,包含有如下列:EmpNO(雇员编号,Varchar(20),Pk),Job(职位Varchar(10)),HirDate(雇佣日期,Date),Sal(月薪,Float)。要求查询全部雇员信息应该是哪些数据?()A、Select * From EmpB、Select * From Emp Where EmpNO Like '%%'C、Select * From Emp Where Name = '%%'D、Select * From Emp Where Name Like '%%'
考题
数据库中有一张表名为Emp,包含有如下列:EmpNO(雇员编号,Varchar(20),Pk),Job(职位Varchar(10)),HirDate(雇佣日期,Date),Sal(月薪,Float)。查询出职位不为“办事员”的雇员信息是()A、Select *From Emp Where Job="办事员"B、Select* From Emp Where Job==’办事员’C、Select* From Emp Where Job’办事员’D、Select* From Emp Where Job!=’办事员’
考题
数据库中有一张表名为Emp,包含有如下列:EmpNO(雇员编号,Varchar(20),Pk),Job(职位Varchar(10)),HirDate(雇佣日期,Date),Sal(月薪,Float)。查询出受雇于1981年的雇员信息是()A、elect * From Emp Where HirDate='1981-1-1' And HirDate ='1981-12-31' B、Select * From Emp Where Between In '1981-1-1' And '1981-12-31'C、Select * From Emp Where Between In '1981-12-31' And '1981-1-1' D、Select * From Emp Where HirDate='1981-1-1' NOT HirDate ='1981-12-31'
考题
数据库中有一张表名为Emp,包含有如下列:EmpNO(雇员编号,Varchar(20),Pk),Job(职位Varchar(10)),HirDate(雇佣日期,Date),Sal(月薪,Float),Comm(奖金,Float,可为空)。查询出雇员编号为791,792,793的雇员信息是()A、Select * From Emp Where EmpNO In('791','792','793')B、Select * From Emp Where EmpNO ='791' Or EmpNO='792' OR EmpNO='793'C、Select * From Emp Where EmpNO ='791' And EmpNO='793'D、Select * From Emp Where EmpNO '791' And EmpNO'793'
考题
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?()A、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);B、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;C、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;D、CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);E、CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;
考题
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? ()A、SELECT last_name FROM EMP WHERE last_ name LIKE '_A%';B、SELECT last_name FROM EMP WHERE last name ='*A%'C、SELECT last_name FROM EMP WHERE last name ='_A%';D、SELECT last_name FROM EMP WHERE last name LIKE '*A%'
考题
查询出所有名字以’S’开始的员工()A、select * from emp where ename in 'S%';B、select * from emp where ename='S%';C、select * from emp where ename like 'S%';D、select * from emp where ename like 'S_';
考题
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? ()A、SELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE 5;B、SELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE 5;C、SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)/365 5;D、SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)*/365 5;
考题
限制从EMP表中只选出前5条记录的查语句为()。A、SELECT TOP 5 * FROM EMPB、SELECT DISTINCT 5 * FROM EMPC、SELECT * FROM EMP WHERE ROWNUM6D、SELECT * FROM EMP WHERE ROWNUM=5
考题
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? ()A、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department _ id IN (10,20);B、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;C、CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;D、CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WITH department_id IN (10,20);E、CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;
考题
Which SQL statement returns a numeric value?()A、SELECT ADD_MONTHS(MAX(hire_Date), 6) FROM EMP;B、SELECT ROUND(hire_date) FROM EMP;C、SELECT sysdate-hire_date FROM EMP;D、SELECT TO_NUMBER(hire_date + 7) FROM EMP;
考题
列出EMP表中,从事每个工种(JOB)的员工人数()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;
考题
多选题关于HQL的聚合函数使用,说法正确的是()。Aselect count(*) from Dept d用于统计部门个数Bselect sum(e.salary) from Emp e用于汇总员工工资总额Cselect max(e.hiredate) from Emp e用于找到最新入职的员工的入职时间Dselect min(e.hiredate) from Emp e用于找到最早入职的员工的入职时间
考题
单选题查询出EMP表中COMM字段为空的记录()A
select * from emp where comm='';B
select * from emp where comm=null;C
select * from emp where nvl(comm)=0;D
select * from emp where comm is null;E
select * from emp where nvl(comm,0)=0;
考题
单选题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? ()A
CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department _ id IN (10,20);B
CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;C
CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;D
CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WITH department_id IN (10,20);E
CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;
考题
单选题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?()A
CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);B
CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH READ ONLY;C
CREATE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) WITH CHECK OPTION;D
CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20);E
CREATE FORCE VIEW emp_vu AS SELECT * FROM employees WHERE department_id IN (10,20) NO UPDATE;
考题
单选题EXHIBIT, Emp Table Exhibit A Exhibit B Examine the data from the EMP table. Evaluate this SQL statement: SELECT * FROM emp WHERE emp _ id = 3); WHERE commission = (SELECT commission FROM emp What is the result when the query is executed?()A
Exhibit AB
Exhibit BC
The query returns no rowsD
The query fails because the outer query is retrieving more than one columnE
The query fails because both the inner and outer queries are retrieving data from the same table.
考题
( 难度:中等)以下哪些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;
热门标签
最新试卷