单选题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

题目
单选题
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?()
A

Column definitions cannot be altered to add DEFAULT values.

B

A change to the DEFAULT value affects only subsequent insertions to the table.

C

Column definitions cannot be altered at add DEFAULT values for columns with a NUMBER data type.

D

All the rows that have a NULL value for the SALARY column will be updated with the value 5000.


相似考题
参考答案和解析
正确答案: A
解析: 暂无解析
更多“单选题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”相关问题
  • 第1题:

    您在公司的数据库中成功创建了名为SALARY的表。您现在要通过向引用EMPLOYEES表的匹配列的SALARY表添加FOREIGNKEY约束条件来建立EMPLOYEES表与SALARY表之间的父/子关系。尚未向SALARY表添加任何数据。应执行以下哪条语句()

    • A、ALTER TABLE salary ADD CONSTRAINT fk_employee_id_01 FOREIGN KEY(employee_id)REFERENCES employees(employee_id)
    • B、ALTER TABLE salary ADD CONSTRAINT fk_employee_id_ FOREIGN KEY BETWEEN salary(employee_id)AND employees(employee_id)
    • C、ALTER TABLE salary FOREIGN KEY CONSTRAINT fk_employee_id_REFERENCES employees(employee_id)
    • D、ALTER TABLE salary ADD CONSTRAINT fk_employee_id_FOREIGN KEY salary(employee_id)=employees(employee_id)

    正确答案:A

  • 第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?()

    • A、SELECT last_name, (salary * 12) * commission_pct FROM EMPLOYEES;
    • B、SELECT last_name, (salary * 12) * IFNULL(commission_pct, 0) FROM EMPLOYEES;
    • C、SELECT last_name, (salary * 12) * NVL2(commission_pct, 0) FROM EMPLOYEES;
    • D、SELECT last_name, (salary * 12) * NVL(commission_pct, 0) FROM EMPLOYEES;

    正确答案:D

  • 第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?()

    • A、SELECT last_name, 12*salary* commission_pct FROM emp;
    • B、SELECT last_name, 12*salary* (commission_pct,0) FROM emp;
    • C、SELECT last_name, 12*salary*(nvl(commission_pct,0)) FROM emp;
    • D、SELECT last_name, 12*salary*(decode(commission_pct,0)) FROM emp;

    正确答案:C

  • 第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? ()

    • 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;

    正确答案:C

  • 第5题:

    单选题
    The EMP table contains these columns: EMPLOYEE_ID NUMBER(4) EMPNAME VARCHAR2 (25) SALARY NUMBER(9,2) HIRE_DATE DATE You query the database with this SQL statement: SELECT empname,hire_date HIREDATE, salary FROM EMP ORDER BY hire_date; How will the results be sorted?()
    A

    randomly

    B

    ascending by date

    C

    descending by date

    D

    ascending alphabetically

    E

    descending alphabetically


    正确答案: A
    解析: 暂无解析

  • 第6题:

    单选题
    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?()
    A

    SELECT last_name, 12*salary* commission_pct FROM emp;

    B

    SELECT last_name, 12*salary* (commission_pct,0) FROM emp;

    C

    SELECT last_name, 12*salary*(nvl(commission_pct,0)) FROM emp;

    D

    SELECT last_name, 12*salary*(decode(commission_pct,0)) FROM emp;


    正确答案: B
    解析: 暂无解析

  • 第7题:

    单选题
    Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_ NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHAR2(30) SALARY NUMBER(8,2) Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only if the minimum salary is less than 5000 and maximum salary is more than 15000?()
    A

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000;

    B

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000 GROUP BY dept_id;

    C

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;

    D

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;

    E

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN(salary) < 5000 AND MAX(salary) > 15000;


    正确答案: E
    解析: 暂无解析

  • 第8题:

    单选题
    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;()
    A

    You get an error because of a primary key violation.

    B

    The data and structure of the EMPLOYEES table are deleted.

    C

    The data in the EMPLOYEES table is deleted but not the structure.

    D

    You get an error because the statement is not syntactically correct.


    正确答案: D
    解析: 暂无解析

  • 第9题:

    单选题
    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;


    正确答案: C
    解析: 暂无解析

  • 第10题:

    单选题
    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?()
    A

    All of the desired results

    B

    Two of the desired results

    C

    One of the desired results

    D

    An error statement


    正确答案: D
    解析: 暂无解析

  • 第11题:

    单选题
    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;


    正确答案: C
    解析: 暂无解析

  • 第12题:

    单选题
    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? ()
    A

    SELECT last_name, 12*salary* commission_pct FROM emp;

    B

    SELECT last_name, 12*salary* (commission_pct,0) FROM emp;

    C

    SELECT last_name, 12*salary*(nvl(commission_pct,0)) FROM emp;

    D

    SELECT last_name, 12*salary*(decode(commission_pct,0)) FROM emp;


    正确答案: D
    解析: 暂无解析

  • 第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?()

    • A、Column definitions cannot be altered to add DEFAULT values.
    • B、A change to the DEFAULT value affects only subsequent insertions to the table.
    • C、Column definitions cannot be altered at add DEFAULT values for columns with a NUMBER data type.
    • D、All the rows that have a NULL value for the SALARY column will be updated with the value 5000.

    正确答案:B

  • 第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;()

    • A、You get an error because of a primary key violation.
    • B、The data and structure of the EMPLOYEES table are deleted.
    • C、The data in the EMPLOYEES table is deleted but not the structure.
    • D、You get an error because the statement is not syntactically correct.

    正确答案:C

  • 第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? ()

    • A、All of the desired results
    • B、Two of the desired results
    • C、One of the desired results
    • D、An error statement

    正确答案:C

  • 第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?()

    • A、Column definitions cannot be altered to add DEFAULT values.
    • B、A change to the DEFAULT value affects only subsequent insertions to the table.
    • C、Column definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type.
    • D、All the rows that have a NULL value for the SALARY column will be updated with the value 5000.

    正确答案:B

  • 第17题:

    单选题
    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; ()
    A

    You get an error because of a primary key violation.

    B

    The data and structure of the EMPLOYEES table are deleted.

    C

    The data in the EMPLOYEES table is deleted but not the structure.

    D

    You get an error because the statement is not syntactically correct.


    正确答案: D
    解析: 暂无解析

  • 第18题:

    单选题
    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?()
    A

    SELECT last_name, (salary * 12) * commission_pct FROM EMPLOYEES;

    B

    SELECT last_name, (salary * 12) * IFNULL(commission_pct, 0) FROM EMPLOYEES;

    C

    SELECT last_name, (salary * 12) * NVL2(commission_pct, 0) FROM EMPLOYEES;

    D

    SELECT last_name, (salary * 12) * NVL(commission_pct, 0) FROM EMPLOYEES;


    正确答案: C
    解析: 暂无解析

  • 第19题:

    单选题
    Evaluate these two SQL statements: SELECT last_name, salary , hire_date FROM EMPLOYEES ORDER BY salary DESC; SELECT last_name, salary , hire_date FROM EMPLOYEES ORDER BY 2 DESC; What is true about them?()
    A

    The two statements produce identical results.

    B

    The second statement returns a syntax error.

    C

    There is no need to specify DESC because the results are sorted in descending order by default.

    D

    The two statements can be made to produce identical results by adding a column alias for the salary column in the second SQL statement.


    正确答案: C
    解析: 暂无解析

  • 第20题:

    单选题
    Examine the description of the EMPLOYEES table: EMP_ID NUMBER(4) NOT NULL LAST_NAME VARCHAR2(30) NOT NULL FIRST_NAME VARCHAR2(30) DEPT_ID NUMBER(2) JOB_CAT VARCHAR2(30) SALARY NUMBER(8,2) Which statement shows the department ID, minimum salary, and maximum salary paid in that department, only of the minimum salary is less then 5000 and the maximum salary is more than 15000?()
    A

    SELECT dept_id, MIN(salary(, MAX(salary) FROM employees WHERE MIN(salary) <5000 AND MAX (salary) > 15000;

    B

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees WHERE MIN(salary) < 5000 AND MAX(salary) > 15000 GROUP BY dept_id;

    C

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN(salary) <5000 AND MAX (salary) > 15000;

    D

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id HAVING MIN (salary) < 5000 AND MAX(salary)

    E

    SELECT dept_id, MIN(salary), MAX(salary) FROM employees GROUP BY dept_id, salary HAVING MIN (salary) <5000 AND MAX (salary) > 15000;


    正确答案: C
    解析: 暂无解析

  • 第21题:

    单选题
    The EMP table contains these columns: EMPLOYEE_ID NUMBER(4) EMPNAME VARCHAR2 (25) SALARY NUMBER(9,2) HIRE_DATE DATE You query the database with this SQL statement: SELECT empname,hire_date HIREDATE, salary FROM EMP ORDER BY hire_date; How will the results be sorted?()
    A

    randomly

    B

    ascending by date

    C

    descending by date

    D

    ascending alphabetically

    E

    descending alphabetically


    正确答案: D
    解析: 暂无解析

  • 第22题:

    单选题
    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?()
    A

    Column definitions cannot be altered to add DEFAULT values.

    B

    A change to the DEFAULT value affects only subsequent insertions to the table.

    C

    Column definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type.

    D

    All the rows that have a NULL value for the SALARY column will be updated with the value 5000.


    正确答案: B
    解析: 暂无解析

  • 第23题:

    单选题
    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? ()
    A

    All of the desired results

    B

    Two of the desired results

    C

    One of the desired results

    D

    An error statement


    正确答案: B
    解析: 暂无解析