COMMIT
MERGE
UPDATE
DELETE
CREATE
DROP...
第1题:
Updating
Viewing
Deleting
Inserting
Truncating
第2题:
No change is required to achieve the desired results.
SELECT ename, sal, 12* (sal+100) FROM emp;
SELECT ename, sal, (12* sal)+100 FROM emp;
SELECT ename, sal +100,*12 FROM emp;
第3题:
SELECT TOTAL(*) FROM customer;
SELECT COUNT(*) FROM customer;
SELECT TOTAL(customer_id) FROM customer;
SELECT COUNT(customer_id) FROM customer;
SELECT COUNT(customers) FROM customer;
SELECT TOTAL(customer_name) FROM customer;
第4题:
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;
第5题:
INSERT INTO employees VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);
INSERT INTO employees VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did IN (20,50));
INSERT INTO (SELECT * FROM employees WHERE department_id IN (20,50)) VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);
INSERT INTO (SELECT * FROM employees WHERE department_id IN (20,50) WITH CHECK OPTION) VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);
INSERT INTO (SELECT * FROM employees WHERE (department_id = 20 AND department_id = 50) WITH CHECK OPTION ) VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);
第6题:
Deleting the records of employees who do not earn commission.
Increasing the commission of employee 3 by the average commission earned in department 20.
Finding the number of employees who do NOT earn commission and are working for department 20.
Inserting into the table a new employee 10 who works for department 20 and earns a commission that is equal to the commission earned by employee 3.
Creating a table called COMMISSION that has the same structure and data as the columns EMP_ID and COMMISSIONS of the EMP table.
Decreasing the commission by 150 for the employees who are working in department 30 and earning a commission of more then 800.
第7题:
TRIM
REPLACE
TRUNC
TO_DATE
MOD
CASE
第8题:
The indexed column is declared as NOT NULL.
The indexed columns are used in the FROM clause.
The indexed columns are part of an expression.
The indexed column contains a wide range of values.
第9题:
You cannot roll back this statement.
All pending transactions are committed.
All views based on the DEPT table are deleted.
All indexes based on the DEPT table are dropped.
All data in the table is deleted, and the table structure is also deleted.
All data in the table is deleted, but the structure of the table is retained.
All synonyms based on the DEPT table are deleted.
第10题:
creates a view with constraints
creates a view even if the underlying parent table has constraints
creates a view in another schema even if you don't have privileges
creates a view regardless of whether or not the base tables exist
第11题:
You want to identify the most senior employee in the company.
You want to find the manager supervising the largest number of employees.
You want to identify the person who makes the highest salary for all employees.
You want to rank the top three sales representatives who have sold the maximum number of products.
第12题:
=
LIKE
BETWEEN
NOT IN
IS
<>
第13题:
Immediately after the SELECT clause
Before the WHERE clause
Before the FROM clause
After the ORDER BY clause
After the WHERE clause
第14题:
Both tables have NULL values.
You want all unmatched data from one table.
You want all matched data from both tables.
You want all unmatched data from both tables.
One of the tables has more data than the other.
You want all matched and unmatched data from only one table.
第15题:
Create groups of data
Sort data in a specific order
Convert data to a different format
Retrieve data based on an unknown condition
第16题:
You want to create a nonequijoin.
The tables to be joined have multiple NULL columns.
The tables to be joined have columns of the same name and different data types.
The tables to be joined have columns with the same name and compatible data types.
You want to use a NATURAL join, but you want to restrict the number of columns in the join condition.
第17题:
CREATE INDEX NAME _IDX (first_name, last_name);
CREATE INDEX NAME _IDX (first_name, AND last_name)
CREATE INDEX NAME_IDX ON (First_name, last_name);
CREATE INDEX NAME_IDX ON employees (First_name, AND last_name);
CREATE INDEX NAME_IDX ON employees (First_name, last_name);
CREATE INDEX NAME_IDX FOR employees (First_name, last_name);
第18题:
To simplify the process of creating new users using the CREATE USER xxx IDENTIFIED by yyy statement.
To grant a group of related privileges to a user.
When the number of people using the database is very high.
To simplify the process of granting and revoking privileges.
To simplify profile maintenance for a user who is constantly traveling.
第19题:
CREATE PUBLIC SYNONYM EDL_VU ON emp_dept_loc_vu
CREATE PUBLIC SYNONYM EDL:VU FOR mary (emp_dept_loc_vu);
CREATE PUBLIC SYNONYM EDL_VU FOR emp _dept_loc_vu;
CREATE SYNONYM EDL_VU ON emp_dept_loc_vu FOR EACH USER;
CREATE SYNONYM EDL_VU FOR EACH USER ON emp_dept_loc_vu
CREATE PUBLIC SYNONYM EDL_VU ON emp_dept_loc_vu FOR ALL USERS;
第20题:
SELECT ename, salary*12 'Annual Salary' FROM employees;
SELECT ename, salary*12 Annual Salary FROM employees;
SELECT ename, salary*12 AS Annual Salary FROM employees;
SELECT ename, salary*12 AS INITCAP(ANNUAL SALARY) FROM employees
第21题:
Both SQL and /SQL*plus allow manipulation of values in the database.
/SQL* Plus recognizes SQL satement and sends them to the server; SQL is the Oracle proprietary interface for executing SQL statements.
/SQL* Plus language for communicating with the Oracle server to access data; SQL recognizes SQL statements and sends them to the server.
/SQL manipulates data and table definition in the database; /SQL* Plus does not allow manipulation of values in the database.
第22题:
Binary data up to 4 gigabytes.
Character data up to 4 gigabytes.
Raw binary data of variable length up to 2 gigabytes.
Binary data stored in an external file, up to 4 gigabytes.
A hexadecimal string representing the unique address of a row in its table.
第23题:
SELECT e.last_name, d. department_name, d.location_id FROM employees e NATURAL JOIN departments D USING department_id ;
SELECT last_name, department_name, location_id FROM employees NATURAL JOIN departments WHERE e.department_id =d.department_id;
SELECT e.last_name, d.department_name, d.location_id FROM employees e NATURAL JOIN departments d;
SELECT e.last_name, d.department_name, d.location_id FROM employees e JOIN departments d USING (department_id );
第24题:
SELECT MAX (gpa) FROM student _ grades WHERE gpa IS NOT NULL;
SELECT (gpa) FROM student _ grades GROUP BY semester_end WHERE gpa IS NOT NULL;
SELECT MAX (gpa) FROM student _ grades WHERE gpa IS NOT NULL GROUP BY semester_end;
SELECT MAX (gpa) GROUP BY semester_end WHERE gpa IS NOT NULL FROM student _ grades;
SELECT MAX (gpa) FROM student _ grades GROUP BY semester_end WHERE gpa IS NOT NULL;