关于数据库的基本测试(oracle,sql)
[color=black][size=2][b][font=Arial]17. Examine the description of the EMPLOYEES table: [/font][/b][/size][/color][font=Arial][size=2][color=#000000][b]EMP_ID NUMBER (4)
NOT NULL [/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][b]LAST_NAME
VARCHAR2 (30) NOT NULL [/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][b]FIRST_NAME
VARCHAR2 (30) [/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][b]DEPT_ID
NUMBER (2) [/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][b]JOB_CAT
VARCHAR (30) [/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][b]SALARY
NUMBER (8, 2) [/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][/color][/size][/font]
[b][font=Arial][size=2][color=#000000]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? [/color][/size][/font][/b]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[list=A][*][font=Arial][size=10pt][color=#000000]SELECT dept_id, MIN (salary), MAX (salary) FROM employees WHERE MIN(salary) < 5000 AND MAX (salary) > 15000; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]SELECT dept_id, MIN (salary), MAX (salary) FROM employees WHERE MIN (salary) < 5000 AND MAX (salary) 15000 GROUP BY dept_id; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]SELECT dept_id, MIN(salary), MAX(salary) FROM employees HAVING MIN (salary) < 5000 AND MAX (salary) [/color][/size][/font][*][b][font=Arial][size=10pt][color=red]SELECT dept_id, MIN (salary), MAX (salary) FROM employees GROUP BY dept_id HAVING MIN(salary) < 5000 AND MAX (salary) > 15000 [/color][/size][/font][/b][*][font=Arial][size=10pt][color=#000000]SELECT dept_id, MIN (salary), MAX (salary) FROM employees GROUP BY dept_id, salary HAVING MIN (salary) < 5000 AND MAX (salary) > 15000; [/color][/size][/font][/list][font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[font=Arial][size=2][color=#000000][b]18. You own a table called EMPLOYEES with this table structure:[/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][b]EMPLOYEE_ID
NUMBER
Primary Key [/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][b]FIRST_NAME
VARCHAR2 (25) [/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][b]LAST_NAME
VARCHAR2 (25) [/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][b]HIRE_DATE
DATE[/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][/color][/size][/font]
[font=Arial][size=2][color=#000000][b]What happens when you execute this DELETE statement? [/b][/color][/size][/font]
[b][font=Arial][size=2][color=#000000]DELETE employees; [/color][/size][/font][/b]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[color=#000000][font=Arial][font=Arial][size=2]A.[/size][/font]
[/font][font=Arial][size=2]You get an error because of a primary key violation. [/size][/font][/color]
[list=A][*][font=Arial][size=10pt][color=#000000]The data and structure of the EMPLOYEES table are deleted. [/color][/size][/font][*][b][font=Arial][size=10pt][color=red]The data in the EMPLOYEES table is deleted but not the structure.[/color] [/size][/font][/b][*][font=Arial][size=10pt][color=#000000]You get an error because the statement is not syntactically correct. [/color][/size][/font][/list][font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[font=Arial][size=2][color=#000000][b]19. Evaluate this SQL statement:[/b][/color][/size][/font]
[b][font=Arial][size=2][color=#000000] [/color][/size][/font][/b]
[b][size=2][color=#000000][font=Arial]SELECT e.employee_id, (.15* e.salary) + (.5 * e.commission_pct) + (s.sales_amount * (.35 * e.bonus)) AS CALC_VALUE [/font][/color][/size][/b]
[b][size=2][color=#000000][font=Arial]FROM employees e, sales [/font][/color][/size][/b]
[b][size=2][color=#000000][font=Arial]WHERE e.employee_id = s.emp_id; [/font][/color][/size][/b]
[font=Arial][size=2][color=#000000][/color][/size][/font]
[b][font=Arial][size=2][color=#000000]What will happen if you remove all the parentheses from the calculation? [/color][/size][/font][/b]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[list=A][*][font=Arial][size=10pt][color=#000000]The value displayed in the CALC_VALUE column will be lower. [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]The value displayed in the CALC_VALUE column will be higher. [/color][/size][/font][*][b][font=Arial][size=10pt][color=red]There will be no difference in the value displayed in the CALC_VALUE column.[/color] [/size][/font][/b][*][font=Arial][size=10pt][color=#000000]An error will be reported. [/color][/size][/font][/list][b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[b][font=Arial][size=10pt]20. Examine the structure of the EMPLOYEES and NEW_EMPLOYEES tables: [/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000]EMPLOYEES: [/color][/size][/font][/b]
[font=Arial][size=10pt][b][color=#000000]EMPLOYEE_ID
NUMBER
Primary Key [/color][/b][/size][/font]
[font=Arial][size=10pt][b][color=#000000]FIRST_NAME
VARCHAR2 (25) [/color][/b][/size][/font]
[font=Arial][size=10pt][b][color=#000000]LAST_NAME
VARCHAR2 (25) [/color][/b][/size][/font]
[font=Arial][size=10pt][b][color=#000000]HIRE_DATE
DATE [/color][/b][/size][/font]
[b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000]NEW_EMPLOYEES:[/color][/size][/font][/b]
[font=Arial][size=10pt][b][color=#000000]EMPLOYEE_ID
NUMBER
Primary Key [/color][/b][/size][/font]
[font=Arial][size=10pt][b][color=#000000]NAME
VARCHAR2 (60) [/color][/b][/size][/font]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[b][font=Arial][size=10pt][color=#000000]Which MERGE statement is valid? [/color][/size][/font][/b]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[list=A][*][b][font=Arial][size=10pt][color=red]MERGE INTO new_employees c USING employees e ON (c.employee_id = e.employee_id) WHEN MATCHED THEN UPDATE SET c.name = e.first_name ||','|| e.last_name WHEN NOT MATCHED THEN INSERT VALUES (e.employee_id, e.first_name ||', '||e.last_name); [/color][/size][/font][/b][*][font=Arial][size=10pt][color=#000000]MERGE new_employees c USING employees e ON (c.employee_id = e.employee_id) WHEN EXISTS THEN UPDATE SET c.name = e.first_name ||','|| e.last_name WHEN NOT MATCHED THEN INSERT VALUES (e.employee_id, e.first_name ||', '||e.last_name); [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]MERGE INTO new_employees c USING employees e ON (c.employee_id = e.employee_id) WHEN EXISTS THEN UPDATE SET c.name = e.first_name ||','|| e.last_name WHEN NOT MATCHED THEN INSERT VALUES(e.employee_id, e.first_name ||', '||e.last_name); [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]MERGE new_employees c FROM employees e ON (c.employee_id = e.employee_id) WHEN MATCHED THEN UPDATE SET c.name = e.first_name ||','|| e.last_name WHEN NOT MATCHED THEN INSERT INTO new_employees VALUES (e.employee_id, e.first_name ||', '||e.! last_name); [/color][/size][/font][/list][font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[b][font=Arial][size=2][color=#000000]21 .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"? [/color][/size][/font][/b]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[list=A][*][b][font=Arial][size=10pt][color=red]SELECT ENAME, LENGTH(ENAME), INSTR(ENAME, 'a') FROM EMPLOYEES WHERE SUBSTR(ENAME, -1, 1) = 'n';[/color] [/size][/font][/b][*][font=Arial][size=10pt][color=#000000]SELECT ENAME, LENGTH(ENAME), INSTR(ENAME, ,-1,1) FROM EMPLOYEES WHERE SUBSTR(ENAME, -1, 1) = 'n'; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]SELECT ENAME, LENGTH(ENAME), SUBSTR(ENAME, -1,1) FROM EMPLOYEES WHERE INSTR(ENAME, 1, 1) = 'n'; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]SELECT ENAME, LENGTH(ENAME), SUBSTR(ENAME, -1,1) FROM EMPLOYEES WHERE INSTR(ENAME, -1, 1) = 'n'; [/color][/size][/font][/list][font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[b][font=Arial][size=10pt]22. You would like to display the system date in the format "Monday, 01 June, 2001". Which SELECT statement should you use?[/size][/font][/b][font=Arial][size=10pt] [/size][/font]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[list=A][*][font=Arial][size=10pt][color=#000000]SELECT TO_DATE (SYSDATE, 'FMDAY, DD Month, YYYY') FROM dual;[/color][/size][/font][*][font=Arial][size=10pt][color=#000000]SELECT TO_CHAR (SYSDATE, 'FMDD, DY Month, YYYY') FROM dual; [/color][/size][/font][*][b][font=Arial][size=10pt][color=red]SELECT TO_CHAR (SYSDATE, 'FMDay, DD Month, YYYY') FROM dual;[/color] [/size][/font][/b][*][font=Arial][size=10pt][color=#000000]SELECT TO_CHAR (SYSDATE, 'FMDY, DDD Month, YYYY') FROM dual; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]SELECT TO_DATE (SYSDATE, 'FMDY, DDD Month, YYYY') FROM dual; [/color][/size][/font][/list][font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[b][font=Arial][size=2][color=#000000]23. What is true about joining tables through an Equijoin? [/color][/size][/font][/b]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[list=A][*][font=Arial][size=10pt][color=#000000]You can join a maximum of two tables through an Equijoin. [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]You can join a maximum of two columns through an Equijoin. [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]You specify an Equijoin condition in the SELECT or FROM clauses of a SELECT statement. [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]To join two tables through an Equijoin, the columns in the join condition must be primary key and foreign key columns. [/color][/size][/font][*][b][font=Arial][size=10pt][color=red]You can join n tables (all having single column primary keys) in a SQL statement by specifying a minimum of n-1 join conditions. [/color][/size][/font][/b][/list][font=Arial][size=10pt][color=red] [/color][/size][/font]
[b][font=Arial][size=2][color=#000000]24. Which four are valid Oracle constraint types? (Choose four.) [/color][/size][/font][/b]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[list=A][*][font=Arial][size=10pt][color=#000000]CASCADE [/color][/size][/font][*][b][font=Arial][size=10pt][color=red]UNIQUE [/color][/size][/font][/b][*][font=Arial][size=10pt][color=#000000]NONUNIQUE [/color][/size][/font][*][b][font=Arial][size=10pt][color=red]CHECK [/color][/size][/font][/b][*][b][font=Arial][size=10pt][color=red]PRIMARY KEY[/color][/size][/font][/b][font=Arial][size=10pt] [/size][/font][*][font=Arial][size=10pt][color=#000000]CONSTANT [/color][/size][/font][*][b][font=Arial][size=10pt][color=red]NOT NULL[/color] [/size][/font][/b][/list][font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[b][font=Arial][size=2][color=#000000]25. View the image below to examine the structures of the EMPLOYEES and TAX tables. [/color][/size][/font][/b]
[color=#000000][b]You need to find the percentage tax applicable for each employee. Which SQL statement would you use? [/b][/color]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[list=A][*][b][font=Arial][size=10pt][color=red]SELECT employee_id, salary, tax_percent FROM employees e, tax t WHERE e.salary BETWEEN t.min_salary AND t.max_salary[/color]; [/size][/font][/b][*][font=Arial][size=10pt][color=#000000]SELECT employee_id, salary, tax_percent FROM employees e, tax t WHERE e.salary > t.min_salary AND < t.max_salary; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]SELECT employee_id, salary, tax_percent FROM employees e, tax t WHERE MIN(e.salary) = t.min_salary AND MAX(e.salary) = t.max_salary; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]You cannot find the information because there is no common column between the two tables. [/color][/size][/font][/list][b][font=Arial][size=2][color=#000000]26. Which SQL statement would you use to remove a view called EMP_DEPT_VU from your schema? [/color][/size][/font][/b]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[list=A][*][font=Arial][size=10pt][color=#000000]DROP emp_dept_vu; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]DELETE emp_dept_vu; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]REMOVE emp_dept_vu; [/color][/size][/font][*][b][font=Arial][size=10pt][color=red]DROP VIEW emp_dept_vu;[/color] [/size][/font][/b][*][font=Arial][size=10pt][color=#000000]DELETE VIEW emp_dept_vu; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]REMOVE VIEW emp_dept_vu; [/color][/size][/font][/list][b][font=Arial][size=10pt][color=#000000]27. Click the Exhibit button to examine the structures of the EMPLOYEES, DEPARTMENTS and LOCATIONS tables. [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000]EMPLOYEES [/color][/size][/font][/b]
[font=Arial][size=10pt][b][color=#000000]EMPLOYEE_ID NUMBER NOT NULL, Primary Key [/color][/b][/size][/font]
[font=Arial][size=10pt][b][color=#000000]EMP NAME VARCHAR2 (30) [/color][/b][/size][/font]
[font=Arial][size=10pt][b][color=#000000]JOB_ID VARCHAR2 (20) [/color][/b][/size][/font]
[font=Arial][size=10pt][b][color=#000000]SALARY NUMBER [/color][/b][/size][/font]
[font=Arial][size=10pt][b][color=#000000]MGR_ID NUMBER References EMPLOYEE_ID column[/color][/b][/size][/font]
[font=Arial][size=10pt][b][color=#000000]DEPARTMENT_ID NUMBER Foreign key to DEPARTMENT_ID column of the DEPARTMENTS table [/color][/b][/size][/font]
[b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000]DEPARTMENTS [/color][/size][/font][/b]
[font=Arial][size=10pt][b][color=#000000]DEPARTMENT_ID NUMBER NOT NULL, Primary Key [/color][/b][/size][/font]
[font=Arial][size=10pt][b][color=#000000]DEPARTMENT_NAME VARCHAR2 (30) [/color][/b][/size][/font]
[font=Arial][size=10pt][b][color=#000000]MGR_ID NUMBER References MGR_ID column of the EMPLOYEES table[/color][/b][/size][/font]
[font=Arial][size=10pt][b][color=#000000]LOCATION_ID NUMBER Foreign key to LOCATION_ID column of the LOCATIONS table [/color][/b][/size][/font]
[b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000]LOCATIONS[/color][/size][/font][/b]
[font=Arial][size=10pt][b][color=#000000]LOCATIONS_ID NUMBER NOT NULL, Primary Key [/color][/b][/size][/font]
[font=Arial][size=10pt][b][color=#000000]CITY VARCHAR2(30) [/color][/b][/size][/font]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[b][size=2][color=#000000][font=Arial]Which two SQL statements produce the; name, department name, and the city of all the employees who earn more than 10000? (Choose Two). [/font][/color][/size][/b]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[list=A][*][b][font=Arial][size=10pt][color=red]SELECT emp_name, department_name, city FROM employees e JOIN departments d USING (department_id) JOIN locations l USING (location_id) WHERE salary > 10000; [/color][/size][/font][/b][*][font=Arial][size=10pt][color=#000000]SELECT emp_name, department_name, city FROM employees e, departments d, locations l JOIN ON (e. department_id = d. department id) AND (d.location_id = l.location_id) AND salary > 10000; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]SELECT emp_name, department_name, city FROM employees e, departments d, locations 1 WHERE salary > 1000; [/color][/size][/font][*][b][font=Arial][size=10pt][color=red]SELECT emp_name, department_name, city FROM employees e, departments d, locations l WHERE e.department_id = d.department_id AND d.location_id = l.location_id AND salary > 10000; [/color][/size][/font][/b][*][font=Arial][size=10pt][color=#000000]SELECT emp_name, department_name, city FROM employees e NATURAL JOIN departments, locations WHERE salary > 10000; [/color][/size][/font][/list][color=black][b][size=2][font=Arial]28. Which is an iSQL*Plus command? [/font][/size][/b][/color]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[list=A][*][font=Arial][size=10pt][color=#000000]INSERT [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]UPDATE [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]SELECT [/color][/size][/font][*][b][font=Arial][size=10pt][color=red]DESCRIBE [/color][/size][/font][/b][*][font=Arial][size=10pt][color=#000000]DELETE [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]RENAME [/color][/size][/font][/list][color=black][size=2][b][font=Arial]29. The EMPLOYEES table has these columns: [/font][/b][/size][/color]
[font=Arial][size=2][color=#000000][b]LAST_NAME
VARCHAR2 (35) [/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][b]SALARY
NUMBER (8, 2) [/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][b]HIRE_DATE
DATE [/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][/color][/size][/font]
[font=Arial][size=2][color=#000000][b]Management wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement: [/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][b]ALTER TABLE EMPLOYEES MODIFY (SALARY DEFAULT 5000); [/b][/color][/size][/font]
[b][font=Arial][size=2][color=#000000]Which is true about your ALTER statement? [/color][/size][/font][/b]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[list=A][*][font=Arial][size=10pt][color=#000000]Column definitions cannot be altered to add DEFAULT values. [/color][/size][/font][*][b][font=Arial][size=10pt][color=red]A change to the DEFAULT value affects only subsequent insertions to the table.[/color] [/size][/font][/b][*][font=Arial][size=10pt][color=#000000]Column definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type. [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]All the rows that have a NULL value for the SALARY column will be updated with the value 5000. [/color][/size][/font][/list][font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[color=black][size=2][b][font=Arial]30. Examine the description of the EMPLOYEES table: [/font][/b][/size][/color]
[font=Arial][size=2][color=#000000][b]EMP_ID
NUMBER (4)
NOT NULL [/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][b]LAST_NAME
VARCHAR2 (30)
NOT NULL [/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][b]FIRST_NAME
VARCHAR2 (30) [/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][b]DEPT_ID
NUMBER (2) [/b][/color][/size][/font]
[font=Arial][size=2][color=#000000][/color][/size][/font]
[b][font=Arial][size=2][color=#000000]Which statement produces the number of different departments that have employees with last name Smith? [/color][/size][/font][/b]
[b][font=Arial][size=2][color=#000000][/color][/size][/font][/b]
[list=A][*][font=Arial][size=10pt][color=#000000]SELECT COUNT(*) FROM employees WHERE last_name='Smith'; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]SELECT COUNT (dept_id) FROM employees WHERE last_name='Smith'; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]SELECT DISTINCT(COUNT(dept_id)) FROM employees WHERE last_name='Smith'; [/color][/size][/font][*][b][font=Arial][size=10pt][color=red]SELECT COUNT(DISTINCT dept_id) FROM employees WHERE last_name='Smith';[/color] [/size][/font][/b][*][font=Arial][size=10pt][color=#000000]SELECT UNIQUE(dept_id) FROM employees WHERE last_name='Smith'; [/color][/size][/font][/list][font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[b][font=Arial][size=2][color=#000000]31. Which SELECT statement should you use to extract the year from the system date and display it in the format "1998"? [/color][/size][/font][/b]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[list=A][*][b][font=Arial][size=10pt][color=red]SELECT TO_CHAR(SYSDATE, 'yyyy') FROM dual;[/color] [/size][/font][/b][*][font=Arial][size=10pt][color=#000000]SELECT TO_DATE(SYSDATE, 'yyyy') FROM dual; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]SELECT DECODE(SUBSTR(SYSDATE, 8), 'YYYY') FROM dual; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]SELECT DECODE(SUBSTR(SYSDATE, 8), 'year') FROM dual; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]SELECT TO_CHAR(SUBSTR(SYSDATE, 8,2),'yyyy') FROM dual; [/color][/size][/font][/list][b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[color=black][b][size=2][font=Arial]32. Which are DML statements? (Choose all that apply.) [/font][/size][/b][/color]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[list=A][*][font=Arial][size=10pt][color=#000000]COMMIT [/color][/size][/font][*][b][font=Arial][size=10pt][color=red]MERGE [/color][/size][/font][/b][*][b][font=Arial][size=10pt][color=red]UPDATE[/color][/size][/font][/b][*][b][font=Arial][size=10pt][color=red]DELETE[/color] [/size][/font][/b][*][font=Arial][size=10pt][color=#000000]CREATE [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]DROP[/color][/size][/font][/list][b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[b][font=Arial][size=10pt]33. The STUDENT_GRADES table has these columns: [/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000]STUDENT_ID
NUMBER (12) [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000]SEMESTER_END
DATE [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000]GPA
NUMBER (4, 3) [/color][/size][/font][/b]
[b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[color=#000000][b][font=Arial][size=10pt]Which statement finds students who have a grade point average (GPA) greater than 3.0 for the calendar year 2001?[/size][/font][/b][font=Arial][size=10pt] [/size][/font][/color]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[list=A][*][font=Arial][size=10pt][color=#000000]SELECT student_id, gpa FROM student_grades WHERE semester_end BETWEEN '01-JAN-2001' AND '31-DEC-2001' OR gpa > 3.0; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]SELECT student_id, gpa FROM student_grades WHERE semester_end BETWEEN '01-JAN-2001' AND '31-DEC-2001' AND gpa > 3.0; [/color][/size][/font][*][b][font=Arial][size=10pt]
[color=red]SELECT student_id, gpa FROM student_grades WHERE semester_end BETWEEN '01-JAN-2001' AND '31-DEC-2001' AND gpa > 3.0; [/color][/size][/font][/b][*][font=Arial][size=10pt][color=#000000]SELECT student_id, gpa FROM student_grades WHERE semester_end BETWEEN '01-JAN-2001' AND '31-DEC-2001' AND gpa >= 3.0; [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]SELECT student_id, gpa FROM student_grades WHERE semester_end > '01-JAN-2001' OR semester_end < '31-DEC-2001' AND gpa >= 3.0; [/color][/size][/font][/list][b][font=Arial][size=10pt][color=#000000] [/color][/size][/font][/b]
[b][font=Arial][size=10pt]34. Top N analysis requires _____ and _____. (Choose two.) [/size][/font][/b]
[font=Arial][size=10pt][color=#000000] [/color][/size][/font]
[list=A][*][font=Arial][size=10pt][color=#000000]the use of rowed [/color][/size][/font][*][font=Arial][size=10pt][color=#000000]a GROUP BY clause [/color][/size][/font][*][b][font=Arial][size=10pt][color=red]an ORDER BY clause[/color] [/size][/font][/b][*][font=Arial][size=10pt][color=#000000]only an inline view [/color][/size][/font][*][b][font=Arial][size=10pt][color=red]an inline view and an outer query[/color] [/size][/font][/b][/list] 怎么没人留言的啊,太基础了?#@#$#$
页:
[1]
