Column definitions cannot be altered to add DEFAULT values.
A change to the DEFAULT value affects only subsequent insertions to the table.
Column definitions cannot be altered at add DEFAULT values for columns with a NUMBER data type.
All the rows that have a NULL value for the SALARY column will be updated with the value 5000.
第1题:
您在公司的数据库中成功创建了名为SALARY的表。您现在要通过向引用EMPLOYEES表的匹配列的SALARY表添加FOREIGNKEY约束条件来建立EMPLOYEES表与SALARY表之间的父/子关系。尚未向SALARY表添加任何数据。应执行以下哪条语句()
第2题:
The EMPLOYEE tables has these columns: LAST_NAME VARCHAR2(35) SALARY NUMBER(8,2) COMMISSION_PCT NUMBER(5,2) You want to display the name and annual salary multiplied by the commission_pct for all employees. For records that have a NULL commission_pct, a zero must be displayed against the calculated column. Which SQL statement displays the desired results?()
第3题:
Management has asked you to calculate the value 12*salary* commission_pct for all the employees in the EMP table. The EMP table contains these columns: LAST NAME VARCNAR2(35) NOT NULL SALARY NUMBER(9,2) NOT NULL COMMISION_PCT NUMBER(4,2) Which statement ensures that a value is displayed in the calculated columns for all employees?()
第4题:
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? ()
第5题:
randomly
ascending by date
descending by date
ascending alphabetically
descending alphabetically
第6题:
SELECT last_name, 12*salary* commission_pct FROM emp;
SELECT last_name, 12*salary* (commission_pct,0) FROM emp;
SELECT last_name, 12*salary*(nvl(commission_pct,0)) FROM emp;
SELECT last_name, 12*salary*(decode(commission_pct,0)) FROM emp;
第7题:
SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000;
SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000 GROUP BY dept_id;
SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;
SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;
SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;
第8题:
You get an error because of a primary key violation.
The data and structure of the EMPLOYEES table are deleted.
The data in the EMPLOYEES table is deleted but not the structure.
You get an error because the statement is not syntactically correct.
第9题:
SELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE >5;
SELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE >5;
SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)/365 >5;
SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)*/365 >5;
第10题:
All of the desired results
Two of the desired results
One of the desired results
An error statement
第11题:
SELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE >5;
SELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE >5;
SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)/365 >5;
SELECT ENAME FROM EMP WHERE (SYSDATE_HIRE_DATE)*/365 >5;
第12题:
All of the desired results
Two of the desired results
One of the desired results
An error statement
第13题:
The EMPLOYEES table has these columns: LAST NAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATE Management wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement: ALTER TABLE EMPLOYEES MODIFY ( SALARY DEFAULT 5000); What is true about your ALTER statement?()
第14题:
You own a table called EMPLOYEES with this table structure: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) HIRE_DATE DATE What happens when you execute this DELETE statement? DELETE employees;()
第15题:
The EMPLOYEES table contains these columns: LAST_NAME VARCHAR2 (25) SALARY NUMBER (6,2) COMMISSION_PCT NUMBER (6) You need to write a query that will produce these results: 1. Display the salary multiplied by the commission_pct. 2. Exclude employees with a zero commission_pct. 3. Display a zero for employees with a null commission value. Evaluate the SQL statement: SELECT LAST_NAME, SALARY*COMMISSION_PCT FROM EMPLOYEES WHERE COMMISSION_PCT IS NOT NULL; What does the statement provide? ()
第16题:
The EMPLOYEES table has these columns:LAST_NAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATEManagement wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement:ALTER TABLE EMPLOYEES MODIFY (SALARY DEFAULT 5000);Which is true about your ALTER statement?()
第17题:
You get an error because of a primary key violation.
The data and structure of the EMPLOYEES table are deleted.
The data in the EMPLOYEES table is deleted but not the structure.
You get an error because the statement is not syntactically correct.
第18题:
SELECT last_name, (salary * 12) * commission_pct FROM EMPLOYEES;
SELECT last_name, (salary * 12) * IFNULL(commission_pct, 0) FROM EMPLOYEES;
SELECT last_name, (salary * 12) * NVL2(commission_pct, 0) FROM EMPLOYEES;
SELECT last_name, (salary * 12) * NVL(commission_pct, 0) FROM EMPLOYEES;
第19题:
The two statements produce identical results.
The second statement returns a syntax error.
There is no need to specify DESC because the results are sorted in descending order by default.
The two statements can be made to produce identical results by adding a column alias for the salary column in the second SQL statement.
第20题:
SELECT dept_id, MIN(salary(, MAX(salary) FROM employees WHERE MIN(salary) <5000 AND MAX (salary) > 15000;
SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000 GROUP BY dept_id;
SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) <5000 AND MAX (salary) > 15000;
SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN (salary) < 5000 AND MAX(salary)
SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN (salary) <5000 AND MAX (salary) > 15000;
第21题:
randomly
ascending by date
descending by date
ascending alphabetically
descending alphabetically
第22题:
Column definitions cannot be altered to add DEFAULT values.
A change to the DEFAULT value affects only subsequent insertions to the table.
Column definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type.
All the rows that have a NULL value for the SALARY column will be updated with the value 5000.
第23题:
Column definitions cannot be altered to add DEFAULT values.
A change to the DEFAULT value affects only subsequent insertions to the table.
Column definitions cannot be altered at add DEFAULT values for columns with a NUMBER data type.
All the rows that have a NULL value for the SALARY column will be updated with the value 5000.
第24题:
SELECT last_name, 12*salary* commission_pct FROM emp;
SELECT last_name, 12*salary* (commission_pct,0) FROM emp;
SELECT last_name, 12*salary*(nvl(commission_pct,0)) FROM emp;
SELECT last_name, 12*salary*(decode(commission_pct,0)) FROM emp;