网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
查询出所有名字以’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_';
参考答案
更多 “查询出所有名字以’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_';” 相关考题
考题
下列哪个语句查出雇员表(employees)里的雇员名字(ename)是‘SMITH’的信息,并且给雇员名字(ename)列定义一个别名Name()。
A.select employeesno,ename Name,job from employees where ename=‘SMITH’B.select employeesno,ename ‘Name’,job from employees where ename=SMITHC.select employeesno,ename “Name”,job from employees where ename=‘SMITH’D.select employeesno,ename ‘Name’,job frome mployees wheree name=‘SMITH’
考题
以下语句不正确的是( )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
考题
Examine the following commands and their output:SQL SELECT ename, sal FROM emp WHERE ename=‘JAMES‘; ENAME SAL JAMES 1050QL UPDATE emp SET sal=sal+sal*1.2 WHERE ename=‘JAMES‘;1 row updated.SQL SELECT ename, sal FROM emp WHERE ename=‘JAMES‘; ENAME SAL JAMES 2310View the exhibit and examine the Flashback Version Query that was executed after the preceding commands.What could be the possible cause for the query not displaying any row?()A. Flashback logging is not enabled for the database.B. The changes made to the table are not committed.C. Supplemental logging is not enabled for the database.D. The database is not configured in ARCHIVELOG mode.
考题
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;
考题
对于第7题的两个基本表,有一个SQL语句: SELECT ENO, ENAME FROM EMP WHERE DNO NOT IN (SELECT DNO FROM DEPT WHERE DNAME='金工车间');其等价的关系代数表达式是:______。A.πENO,ENAME(σDNAME≠'金工车间'(EMPDEPT))B.πENO,ENAMEC.πENO,ENAME(EMP)-πENO,ENAME (σDNAME='金工车间'(EMPDEPT))D.πENO,ENAME (EMP)-πENO,ENAME (σDNAME≠'金工车间'(EMPDEPT))
考题
在Oracle中,下面哪条语句当COMM字段为空时显示0,不为空时显示COMM的值()。
A.select ename,nvl(comm.,0)from empB.select ename,null(comm.,0)from empC.SELECT ename,NULLIF(comm,0)FROM empD.SELECT ename,DECODE(comm.,NULL,0)FROM emp
考题
下列哪个语句查出雇员表(employees)里的雇员名字(ename)是‘SMITH’的信息,并且给雇员名字(ename)列定义一个别名Name()。A、select employeesno,ename Name,job from employees where ename=‘SMITH’B、select employeesno,ename ‘Name’,job from employees where ename=SMITHC、select employeesno,ename “Name”,job from employees where ename=‘SMITH’D、select employeesno,ename ‘Name’,job frome mployees wheree name=‘SMITH’
考题
你要操纵Oracle数据,下列哪个不是SQL命令?()A、select*from dual;B、set defineC、update emp set ename=6543where ename=‘SMITHERS’;D、create table employees(empid varchar2(10)primary key);
考题
查询出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';
考题
在Oracle中,下面哪条语句当COMM字段为空时显示0,不为空时显示COMM的值()。A、select ename,nvl(comm.,0)from empB、select ename,null(comm.,0)from empC、SELECT ename,NULLIF(comm,0)FROM empD、SELECT ename,DECODE(comm.,NULL,0)FROM emp
考题
下面的查询中哪一个会产生笛卡尔集()A、SELECT e.empno,e.ename, e.deptno, d.deptno,d.loc FROM emp e,dept d WHERE e.deptno=d.deptnoB、SELECT e.empno, e.ename, e.deptno, d.deptno,d.loc FROM emp e,dept dC、SELECT e.empno, e.ename, e.deptno, d.deptno,d.loc FROM emp e,dept d WHERE e.empno=101 and e.deptno=d.deptnoD、SELECT e.empno, e.ename, e.deptno, d.deptno,d.loc FROM emp e,dept d WHEREe.deptno=d.deptno and d.deptno=60
考题
数据库中有一张表名为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!=’办事员’
考题
Evaluate this SQL statement: SELECT ename, sal, 12* sal+100 FROM emp; The SAL column stores the monthly salary of the employee. Which change must be made to the above syntax to calculate the annual compensation as "monthly salary plus a monthly bonus of $100, multiplied by 12"? ()A、No change is required to achieve the desired results.B、SELECT ename, sal, 12* (sal+100) FROM emp;C、SELECT ename, sal, (12* sal)+100 FROM emp;D、SELECT ename, sal +100,*12 FROM emp;
考题
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%'
考题
The EMPLOYEES table contains these columns: EMPLOYEE_ID NUMBER(4) ENAME VARCHAR2 (25) JOB_ID VARCHAR2(10) Which SQL statement will return the ENAME, length of the ENAME, and the numeric position of the letter "a" in the ENAME column, for those employees whose ENAME ends with a the letter "n"?()A、SELECT ENAME, LENGTH(ENAME), INSTR(ENAME, 'a') FROM EMPLOYEES WHERE SUBSTR (ENAME, -1,1) = 'n';B、SELECT ENAME, LENGTH(ENAME), INSTR(ENAME, ,-1,1) FROM EMPLOYEES WHERE SUBSTR (ENAME, -1,1) = 'n';C、SELECT ENAME, LENGTH(ENAME), SUBSTR(ENAME, -1,1) FROM EMPLOYEES WHERE INSTR (ENAME, 1,1) = 'n';D、SELECT ENAME, LENGTH(ENAME), SUBSTR(ENAME, -1,1) FROM EMPLOYEES WHERE INSTR (ENAME, -1,1) = 'n';
考题
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;
考题
User SCOTT executes the following command on the EMP table but has not issued COMMIT, ROLLBACK, or any data definition language (DDL) command: SQL SELECT ename FROM emp 2 WHERE job=’CLERK’ FOR UPDATE OF empno; SCOTT has opened another session to work with the database instance. Which three operations wouldwait when issued in SCOTT’s second session()A、LOCK TABLE emp IN SHARE MODE;B、LOCK TABLE emp IN EXCLUSIVE MODE;C、UPDATE emp SET sal=sal*1.2 WHERE job=MANAGER;D、INSERT INTO emp(empno,ename) VALUES (1289,’Harry’);E、SELECT ename FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno;
考题
User SCOTT executes the following command on the EMP table but has not issued COMMIT, ROLLBACK, orany data definition language (DDL) command: SQL SELECT ename FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno; SCOTT has opened another session to work with the database instance. Which three operations would waitwhen issued in SCOTT’s second session()A、LOCK TABLE emp IN SHARE MODE;B、LOCK TABLE emp IN EXCLUSIVE MODE;C、UPDATE emp SET sal=sal*1.2 WHERE job=ANAGER?UPDATE emp SET sal=sal*1.2 WHERE job=?ANAGER?D、INSERT INTO emp(empno,ename) VALUES (1289,’Harry’);E、SELECT ename FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno
考题
限制从EMP表中只选出前5条记录的查语句为()。A、SELECT TOP 5 * FROM EMPB、SELECT DISTINCT 5 * FROM EMPC、SELECT * FROM EMP WHERE ROWNUM6D、SELECT * FROM EMP WHERE ROWNUM=5
考题
User SCOTT executes the following command on the EMP table but has not issued COMMIT, ROLLBACK,or any data definition language (DDL) command: SQL SELECT job FROM emp 2 WHERE job=’CLERK’ FOR UPDATE OF empno; SCOTT has opened another session to work with the database. Which three operations would wait when issued in SCOTT’s second session?()A、LOCK TABLE emp IN SHARE MODE;B、LOCK TABLE emp IN EXCLUSIVE MODE;C、DELETE FROM emp WHERE job=’MANAGER’;D、INSERT INTO emp(empno,ename) VALUES (1289,’Dick’);E、SELECT job FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno;
考题
单选题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;
考题
单选题查询出所有名字以’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_';
考题
多选题User SCOTT executes the following command on the EMP table but has not issued COMMIT, ROLLBACK,or any data definition language (DDL) command: SQL SELECT job FROM emp 2 WHERE job=’CLERK’ FOR UPDATE OF empno; SCOTT has opened another session to work with the database. Which three operations would wait when issued in SCOTT’s second session?()ALOCK TABLE emp IN SHARE MODE;BLOCK TABLE emp IN EXCLUSIVE MODE;CDELETE FROM emp WHERE job=’MANAGER’;DINSERT INTO emp(empno,ename) VALUES (1289,’Dick’);ESELECT job FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno;
考题
多选题User SCOTT executes the following command on the EMP table but has not issued COMMIT, ROLLBACK, or any data definition language (DDL) command: SQL SELECT ename FROM emp 2 WHERE job=’CLERK’ FOR UPDATE OF empno; SCOTT has opened another session to work with the database instance. Which three operations wouldwait when issued in SCOTT’s second session()ALOCK TABLE emp IN SHARE MODE;BLOCK TABLE emp IN EXCLUSIVE MODE;CUPDATE emp SET sal=sal*1.2 WHERE job=MANAGER;DINSERT INTO emp(empno,ename) VALUES (1289,’Harry’);ESELECT ename FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno;
考题
多选题User SCOTT executes the following command on the EMP table but has not issued COMMIT, ROLLBACK, orany data definition language (DDL) command: SQL SELECT ename FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno; SCOTT has opened another session to work with the database instance. Which three operations would waitwhen issued in SCOTT’s second session()ALOCK TABLE emp IN SHARE MODE;BLOCK TABLE emp IN EXCLUSIVE MODE;CUPDATE emp SET sal=sal*1.2 WHERE job=ANAGER?UPDATE emp SET sal=sal*1.2 WHERE job=?ANAGER?DINSERT INTO emp(empno,ename) VALUES (1289,’Harry’);ESELECT ename FROM emp WHERE job=’CLERK’ FOR UPDATE OF empno
考题
( 难度:中等)以下哪些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;
热门标签
最新试卷