Oracle Introduction to PL/SQL

Size: px
Start display at page:

Download "Oracle Introduction to PL/SQL"

Transcription

1 Oracle Introduction to PL/SQL 1. For which column would you create an index? a. a column that is small b. a column that is updated frequently c. a column containing a wide range of values d. a column with a small number of null values 2. The TEACHER table contains these columns: ID NUMBER(7) PK SALARY NUMBER(7,2) SUBJECT_ID NUMBER(7) Evaluate these two SQL statements: 1. SELECT ROUND(SUM(salary),-4) FROM teacher; 2. SELECT subject_id, ROUND(SUM(salary),-2) FROM teacher GROUP BY subject_id; How will the results differ? a. Statement 1 will display a result for each teacher. b. Statement 2 could display more than one row of results. c. The results will be the same, but the display will differ. d. One of the statements will generate an error. 3. Evaluate this SQL*Plus command: START emp_rec.sql Which SQL*Plus command will achieve the same results? a. &emp_rec.sql emp_rec.sql c. GET emp_rec.sql d. SAVE emp_rec.sql 4. You issue this command: GRANT update ON inventory TO joe WITH GRANT OPTION; Which task has been accomplished? a. Only a system privilege was given to user JOE. b. Only an object privilege was given to user JOE. c. User JOE was granted all privileges on the object. d. Both an object privilege and a system privilege were given to user JOE. 5. With which option could a view be created to prevent a user from updating rows in the base table that are not accessible to the view? a. group function

2 b. GROUP BY clause c. DISTINCT command d. WITH CHECK OPTION 6. The PERSONNEL table contains these columns: ID NUMBER(9) LAST_NAME VARCHAR2(25) FIRST_NAME VARCHAR2(25) MANAGER_ID NUMBER(9) For this example, department managers are personnel. Evaluate these two SQL statements: SELECT FROM WHERE SELECT FROM WHERE p.last_name, p.first_name, m.last_name, m.first_name personnel p, personnel m m.id = p.manager_id; p.last_name, p.first_name, m.last_name, m.first_name personnel p, personnel m m.manager_id = p.id; How do the two statements differ? a. One of the statements will not execute. b. One of the statements is not a self-join. c. The results of the statements will be the same, but the format will be different. d. The results of the statements will be different, but the display will be the same. 7. You want to display the name, department, and salary of all employees that have the same department and salary as a particular employee identified by the employee id entered by the user. The employees displayed must not have received bonuses. Which statement will you use? a. SELECT name, department_id, salary FROM employee WHERE (department_id, salary) IN (SELECT department_id, salary FROM employee WHERE employee_id = &1) AND bonus IS NULL; b. SELECT name, department_id, salary FROM employee WHERE (department_id, salary, bonus) = (SELECT department_id, salary, bonus FROM employee WHERE employee_id = &1) AND bonus = NULL;

3 c. SELECT name, department_id, salary FROM employee WHERE (department_id, salary)(*) = (SELECT department_id, salary FROM employee WHERE employee_id = &1) AND bonus IS NULL; d. SELECT name, department_id, salary FROM employee WHERE (SELECT department_id, salary FROM employee WHERE employee_id = &1) AND bonus = 0; 8. When will a SELECT statement in a PL/SQL block raise an exception? a. It retrieves only one row. b. It retrieves more than one row. c. The SELECT statement is missing a required clause. d. The datatypes within the SELECT statement are inconsistent. 9. Which clause would you use in a SELECT statement to limit the display of the ID_NUMBER values to those whose price is less than 5.00? a. WHERE price < 5.00 b. HAVING price < 5.00 c. ORDER BY price < 5.00 d. GROUP BY price < Evaluate this SQL statement: SELECT i.id_number, m.id_number i, manufacturer m WHERE i.manufacturer_id = m.id_number ORDER BY 1; Which clause prevents all the rows in the INVENTORY table from being joined to all the rows in the MANUFACTURER table? a. ORDER BY 1; b. SELECT i.id_number, m.id_number c. I, manufacturer m d. WHERE i.manufacturer_id = m.id_number 11. Evaluate this PL/SQL block: BEGIN FOR i IN 1..6 LOOP IF i = 2 OR i = 3 THEN null; ELSE INSERT INTO example(one) VALUES (i); END IF; ROLLBACK; END LOOP; COMMIT; END;

4 How many values will be inserted into the EXAMPLE table? a. 0 b. 1 c. 2 d. 3 e You want to display inventory id numbers and their descriptions with these desired results: 1. The price of the item must be 8.25 or The display must be sorted alphabetically by the item description. 3. The items must have been ordered prior to June 10, Evaluate this SQL script: SELECT id_number, description WHERE price IN (8.25, 0.25) ORDER BY description desc; What does the proposed solution provide? a. one of the desired results b. two of the desired results c. all of the desired results d. no results because the statement will not execute 13. Evaluate this SQL statement: SELECT * FROM USER_CATALOG; What might be displayed by this statement? a. names of all the views that you own b. names of all the views you can query c. names of all the views in the database d. names of all the data dictionary views 14. Which statement concerning the executable section of a PL/SQL block is true? a. PL/SQL expressions may contain group functions. b. PL/SQL expressions may not contain SQL functions. c. Some group functions are available within SQL statements. d. Statements within a nested block may contain an exception section.

5 15. You need to disable the PRIMARY KEY constraint on the ID column in the INVENTORY table and update all the values in the INVENTORY table. After the update is complete, you need to enable the constraint and verify that column values do not violate the constraint. If any of the ID column values do not conform to the constraint, an error message should be returned. Evaluate this command: ALTER TABLE inventory ENABLE CONSTRAINT inventory_id_pk; Which statement is true? a. The statement will achieve the desired results. b. The statement will execute, but will not enable the PRIMARY KEY constraint. c. The statement will execute, but will not verify that values in the ID column do not violate the constraint. d. The statement will return a syntax error. 16. Which SELECT statement displays the number of items whose PRICE value is greater than 5.00? a. SELECT SUM(*) WHERE price > 5.00; b. SELECT COUNT(*) ORDER BY price; c. SELECT COUNT(*) WHERE price > 5.00; d. SELECT SUM(*) GROUP BY price > 5.00; 17. Given the following

6 Evaluate this PL/SQL block: DECLARE v_new_tech_id NUMBER := ; v_old_tech_id NUMBER := ; v_rows_updated NUMBER := 1; BEGIN UPDATE service SET technician_id = v_new_tech_id WHERE technician_id = v_old_tech_id; v_rows_updated := SQL%ROWCOUNT; DBMS_OUTPUT.PUT_LINE (TO_CHAR(v_rows_updated)); END; Which value would be displayed? a. 1 b. 2 c. 7 d Given the following You created a report to display the prices of products from your warehouse inventory. Which script will you use to display the prices in this format: "$0.25"? a. SELECT TO_CHAR(price, '$999990') ; b. SELECT TO_NUM(price, '$ ') ; c. SELECT TO_NUMBER(price, '$ ') ; d. SELECT TO_CHAR(price, '$ ') ; 19. The CLASSES and SCHEDULE tables contain these columns:

7 CLASSES ID NUMBER(9) CLASS_NAME VARCHAR2(20) TEACHER_ID NUMBER(9) SCHEDULE CLASS_TIME DATE CLASS_ID NUMBER(9) You need to create a view that displays the class name and class time of each class ordered by the teacher id. Evaluate this command: CREATE VIEW class_schedule AS SELECT c.class_name, s.class_time FROM classes c, schedule s WHERE c.id = s.class_id; Which result does the statement provide? a. The statement will create the CLASS_SCHEDULE view and achieve the desired result. b. The statement will create the CLASS_SCHEDULE view, but will not create the desired result. c. The statement will return a syntax error because a CREATE VIEW statement CANNOT be based on a join query. d. The statement will return a syntax error because a CREATE VIEW statement does NOT contain an ORDER BY clause. 20. You issue this statement: CREATE PUBLIC SYNONYM parts FOR marilyn.inventory; Which task was accomplished? a. A new object was created. b. A new object privilege was assigned. c. A new system privilege was assigned. d. The need to qualify an object name with its schema was eliminate 21. Which logical operator could you use to add additional conditions that must be met to the WHERE clause in a simple join query? a. OR b. NOT c. AND d. None 22. Which arithmetic operation will return a numeric value? a. '01-FEB-1998' + 25 b. '03-DEC-1997' - 30 c. '07-JUL-1997' + (480/24) d. TO_DATE('01-JAN-1998') - TO_DATE('01-DEC-1996') 23. In which two statements would you typically use the CURRVAL pseudocolumn? (Choose two.) a. SELECT list of a view b. SET clause of an UPDATE statement

8 c. subquery in an UPDATE statement d. VALUES clause of an INSERT statement e. SELECT statement with the HAVING clause 24. How many values could a subquery with a single row comparison operator return? a. only 1 b. up to 2 c. up to 10 d. unlimited 25. You attempt to query the database with this SQL statement: SELECT 100/NVL(quantity, 0) FROM inventory; Why does this statement cause an error when QUANTITY values are null? a. The expression attempts to divide by zero. b. The expression attempts to divide by a null value. c. The datatypes in the conversion function are incompatible. d. A null value used in an expression cannot be converted to an actual value. 26. Which statement will you use to eliminate the need for all users to qualify Marilyn's INVENTORY table with its schema when querying? a. CREATE SYNONYM inventory FOR inventory; b. CREATE PUBLIC SYNONYM inventory FOR marilyn; c. CREATE PUBLIC SYNONYM inventory FOR marilyn.inventory; d. CREATE PUBLIC inventory SYNONYM FOR marilyn.inventory; 27. In a PL/SQL IF-THEN-ELSE statement, which value will cause the conditional statement to execute? a. NULL b. TRUE c. FALSE 28. Which command would cause an implicit COMMIT command? a. GRANT b. UPDATE c. COMMIT d. SELECT e. ROLLBACK

9 29. Which SELECT statement would display the next value of the PARTS_ID sequence? a. SELECT NEXTVAL(parts_id) FROM SYS.DUAL; b. SELECT parts_id.nextval ; c. SELECT parts_id.nextval FROM SYS.DUAL d. SELECT NEXTVAL(parts_id) ; 30. Which clause would you use in an ALTER TABLE command to remove a constraint from the PRICE column in the INVENTORY table? a. DROP b. ALTER c. REMOVE d. DELETE 31. Which statement would you use to display the id and description of each item that was ordered before January 1, 1997 and has a price less than 1.00 or greater than 5.00? Sort the results by the most recent date ordered. a. SELECT id_number, description WHERE price IN (1.00, 5.00) OR order_date < '01-JAN-97' SORT BY order_date; b. SELECT id_number, description WHERE price BETWEEN 1.00 AND 5.00 OR order_date < '01-JAN-1997' ORDER BY order_date; c. SELECT id_number, description WHERE price < 1.00 OR price > 5.00 AND order_date < '01-Jan-97' ORDER BY order_date ASC; d. SELECT id_number, description WHERE (price <1.00 OR price > 5.00) AND order_date < '01-JAN-1997' ORDER BY order_date DESC;

10 32. What does the COMMENT ON TABLE command do? a. assigns a table alias b. adds a comment column to a table c. adds a comment about a table to the data dictionary d. adds a comment about a column to the data dictionary 33. Which privilege must you have to drop another user's sequence? a. DROP SEQUENCE b. DELETE SEQUENCE c. DROP ANY SEQUENCE d. DELETE ANY SEQUENCE 34. These are the columns in the PRODUCT table: PRODUCT_ID NUMBER(9) PRODUCT_NAME VARCHAR2(25) COST NUMBER(5,2) PRICE NUMBER(5,2) MANUFACTURER_ID NUMBER(9) You need to display product names, prices, manufacturer ids, and average prices for all the products that cost more than the average cost of products by the same manufacturer. Which SELECT statement will achieve these results? a. SELECT product_name, cost, manufacturer_id, AVG(price) FROM product p, product a WHERE p.manufacturer_id = a.manufacturer_id GROUP BY product_name, cost, manufacturer_id; b. SELECT product_name, cost, p.manufacturer_id, AVG(price) FROM product p, (SELECT manufacturer_id, AVG(cost) avg_cost FROM product GROUP BY manufacturer_id) a WHERE p.cost > a.avg_cost GROUP BY product_name, cost, manufacturer_id; c. SELECT product_name, cost, manufacturer_id, AVG(price) FROM product WHERE manufacturer_id IN (SELECT manufacturer_id, AVG(cost) avg_cost FROM product GROUP BY manufacturer_id) GROUP BY product_name, cost, manufacturer_id; d. SELECT product_name, cost, p.manufacturer_id, AVG(price) FROM product p, (SELECT manufacturer_id, AVG(cost) avg_cost FROM product GROUP BY manufacturer_id) a WHERE p.manufacturer_id = a.manufacturer_id AND p.cost > a.avg_cost GROUP BY product_name, cost, manufacturer_id; 35. Which command allows you to alter a view without regranting object privileges previously granted on it? a. ALTER b. CREATE c. MODIFY

11 d. CREATE OR REPLACE 36. Given the following Which statement would you use to increase the NAME column length to 25? a. ALTER TABLE employee MODIFY name VARCHAR2(25); b. ALTER TABLE employee RENAME name VARCHAR2(25); c. ALTER employee TABLE MODIFY COLUMN name VARCHAR2(25); d. ALTER employee TABLE MODIFY COLUMN (name VARCHAR2(25)); 37. In which section of a PL/SQL block is a WHEN OTHERS clause allowed? a. header b. exception c. executable d. declarative 38. Evaluate this SQL statement: SELECT id_number, description, price WHERE manufacturer_id IN (SELECT manufacturer_id WHERE price > 8.00 OR quantity > 1000); Which values will be displayed? a. The id number, description, and price of items in inventory that are priced greater than 8.00 and have a quantity value greater than b. The id number, description, and price of items in inventory that are priced greater than 8.00 or that have a quantity value greater than c. The id number, description, and price of items in inventory that are priced greater than 8.00 or that have a quantity value greater than 1000 and have a manufacturer id value. d. The id number, description, and price of items in inventory that were manufactured by a manufacturer with items in inventory that are priced greater than 8.00 or with items in inventory that have a quantity value greater than Evaluate this SELECT statement: SELECT s.student_name, s.grade_point_avg, s.major_id, m.gpa_avg

12 FROM student s, (SELECT major_id, AVG(grade_point_avg) gpa_avg FROM student GROUP BY major_id) m WHERE s.major_id = m.major_id AND s.grade_point_avg > m.gpa_avg; Which statement about this SELECT statement is true? a. The subquery produces a nonpairwise comparison of the columns. b. The subquery can be used as a data source for other SELECT statements. c. The SELECT statement will cause a syntax error because a FROM clause CANNOT contain a subquery. d. The need to create a grade point average view is eliminated by using a subquery in the FROM clause. 40. Evaluate this IF statement: IF v_num > 5 THEN v_example := 1; ELSIF v_num > 10 THEN v_example := 2; ELSIF v_num < 20 THEN v_example := 3; ELSIF v_num < 39 THEN v_example := 4; ELSE v_example := 5; END IF; If V_NUM is 37, which value would be assigned to V_EXAMPLE? a. 1 b. 2 c. 3 d. 4 e The CUSTOMER table contains these columns: CUSTOMER_ID NUMBER(9) LAST_NAME VARCHAR2(20) FIRST_NAME VARCHAR2(20) CREDIT_LIMIT NUMBER(9,2) Examine this code: DECLARE CURSOR cust_cursor IS SELECT cust_id, last_name, first_name FROM customer; cust_rec cust_cursor%rowtype; How could you populate the CUST_REC record? a. Add a LOOP to the cursor declaration. b. Use an INSERT INTO statement in the executable section of the PL/SQL block. c. Use a LOOP that contains a FETCH statement in the executable section of the PL/SQL block. d. Use a SELECT statement with the INTO option in the executable section of the PL/SQL block. 42. Which is a SQL*Plus command? a. UPDATE

13 b. CHANGE c. SELECT d. ALTER TABLE 43. Which PL/SQL section contains SQL statements to manipulate data in the database? a. header b. exception c. executable d. declarative 44. Evaluate this cursor declaration: DECLARE CURSOR prod_cursor IS SELECT product_name, cost, manufacturer_id, AVG(price) FROM product p, (SELECT manufacturer_id, AVG(cost) avg_cost) FROM product GROUP BY manufacturer_id) a WHERE p.manufacturer_id = a.manufacturer_id AND p.cost > a.avg_cost GROUP BY product_name, cost, manufacturer_id; Which statement is true? a. The subquery creates a temporary data source for the SELECT statement. b. The cursor declaration will return a syntax error because a cursor CANNOT be based on a join. c. The cursor will contain the MANUFACTURER_ID and AVG(COST) values from the PRODUCT table when opened. d. The cursor will contain the PRODUCT_NAME, COST, MANUFACTURER_ID, AVG(PRICE), MANUFACTURER_ID and AVG(COST) values from the PRODUCT table when opened. 45. Evaluate this incomplete loop: LOOP INSERT INTO inventory (id_number, description) VALUES (v_id_number, v_description); v_counter := v_counter + 1; Which statement will need to be added to conditionally stop the execution of the loop? a. END b. EXIT c. END LOOP d. EXIT WHEN 46. When executed, which statement displays a zero if the QUANTITY value is null? a. SELECT id_number, 100 / quantity ; b. SELECT id_number, NVL(100 / quantity, 0) ; c. SELECT id_number, NULL(100 / quantity, 0) ; d. SELECT id_number, TO_CHAR(100 / quantity, 0) ;

14 47. In which section of a PL/SQL block could a new value be assigned to an initialized variable? a. end b. header c. executable d. declarative 48. Given the following Select machine_id from service where technician_id=null; Which result does the query provide? a. No values will be displayed. b. The value will be displayed. c. The value will be displayed. d. A syntax error will be returned. 49. Given the following You need to reduce the PRICE column precision to 6 with a scale of 2 and ensure that when inserting a row into the INVENTORY table without a value for the PRICE column, a price of $5.00 will automatically be inserted. There are no records in the INVENTORY table. Which statement will you use? a. ALTER TABLE inventory ADD OR REPLACE (price NUMBER(8,2) DEFAULT 5); b. ALTER TABLE inventory MODIFY (price NUMBER(6,2) DEFAULT 5); c. ALTER TABLE inventory MODIFY COLUMN (price NUMBER(6,2) DEFAULT '$5.00') d. You cannot reduce the size of a column. 50.Evaluate this PL/SQL block: SET VERIFY OFF SET SERVEROUTPUT ON

15 ACCEPT p_value1 PROMPT 'Please enter the first number: ' ACCEPT p_value2 PROMPT 'Please enter the second number: ' DECLARE v_value1 NUMBER := &p_value1; v_value2 NUMBER := &p_value2; v_result NUMBER; BEGIN v_result := v_value1 / v_value2; DMBS_OUTPUT.PUT_LINE (TO_CHAR(NVL(v_result, 0))); END; / SET VERIFY ON SET SERVEROUTPUT OFF Which statement about this PL/SQL block is true? a. The block will display a zero, regardless of the value of V_RESULT. b. The block will display a zero if the V_RESULT parameter is equal to null. c. The block will return an error because a PL/SQL variable was used. d. The block will return an error because a SQL*Plus variable was NOT used. 51. Given the following????????????????????????????????????????/ SELECT id_number, manufacturer_id WHERE description = '&description'; SELECT FROM WHERE SELECT FROM WHERE SELECT FROM WHERE id_number, manufacturer_id inventory description = LOWER('&description'); id_number, manufacturer_id inventory LOWER(description) = '&description'; id_number, manufacturer_id inventory UPPER(description) = UPPER('&description'); 52. The STUDENT table contains these columns: ID NUMBER(9) PK LAST_NAME VARCHAR2(25) FIRST_NAME VARCHAR2(25) SUBJECT_ID NUMBER(9) Compare these two SQL statements:

16 1. SELECT DISTINCT subject_id, last_name, first_name FROM student ORDER BY 1; 2. SELECT id, last_name, first_name, subject_id FROM student ORDER BY subject_id; How will the results differ? a. Statement 1 will be sorted alphabetically; statement 2 will not. b. Statement 1 will limit duplicate subject id's; statement 2 will not. c. Statement 2 will eliminate duplicate rows from the output; statement 1 will not. d. Statement 1 and 2 will display distinct combinations of the values in the STUDENT table. 53. Which statement concerning the referencing of declared variables within the executable section of a PL/SQL block is true? a. A variable declared in a nested block may not be referenced in any outer blocks. b. A variable declared in an outer block may reference variables declared in nested blocks. c. A declared variable may be referenced in all nested sub-blocks as well as any outer blocks. d. A variable declared in the executable section of a nested block may reference a variable declared in an outer block. 54. Examine the structure of the TEACHER table: Name Null? Type ID NOT NULL NUMBER(9) SALARY NUMBER(7,2) SUBJECT_ID NOT NULL NUMBER(3) SUBJECT_DESCRIPTION VARCHAR2(20) There are 200 teachers and 15 subjects. Each subject is taught by at least 2 teachers. Evaluate this PL/SQL block: DECLARE v_pct_raise number := 1.10; BEGIN UPDATE teacher SET salary = salary * 1.10 WHERE subject_id IN (102, 105); COMMIT; END; Which result will the PL/SQL block provide? A. Only two teachers will receive a 10% salary increase. b. All of the teachers will receive a 10% salary increase. C. At least four teachers will receive a 10% salary increase. D. A syntax error will occur. 55. Evaluate this view definition: CREATE OR REPLACE VIEW parts_view AS SELECT manufacturer_id, COUNT(part_id) TOTAL_PARTS FROM parts

17 GROUP BY manufacturer_id; Which statement can be issued on the PARTS_VIEW view? A. SELECT * FROM parts_view; B. UPDATE parts_view SET total_parts = WHERE manufacturer_id = 3983; C. DELETE FROM parts_view WHERE manufacturer_id= D. INSERT INTO parts_view VALUES (89485, 1009); 56. Evaluate this SQL statement: SELECT manufacturer_id, COUNT(*), order_date WHERE price > 5.00 GROUP BY order_date, manufacturer_id HAVING COUNT(*) > 10 ORDER BY order_date DESC; Which clause specifies which rows will be returned from the INVENTORY table? A. WHERE price > 5.00 B. HAVING COUNT(*) > 10 C. ORDER BY order_date DESC; D. GROUP BY order_date, manufacturer_id 57. Which statement represents an equijoin? A. SELECT. id_number, m.manufacturer_id i, manufacturer m WHERE i.manufacturer_id = m.manufacturer_id; B. SELECT. id_number, m.manufacturer_id i, manufacturer m WHERE i.manufacturer_id = m.manufacturer_id(+); C. SELECT. id_number, m.manufacturer_id i, manufacturer m WHERE i.manufacturer_id(+) = m.manufacturer_id; D. SELECT. id_number, m.manufacturer_id i, manufacturer m WHERE i.manufacturer_id = i.manufacturer_id AND i.id_number = 2365; 58. You attempt to query the database with this SQL statement: SELECT inventory.id_number, manufacturer.id_number i, manufacturer m WHERE i.manufacturer_id = m.id_number ORDER BY 1;

18 Which clause causes an error? A. ORDER BY 1; B. i, manufacturer m C. WHERE i.manufacturer_id = m.id_number D. SELECT inventory.id_number, manufacturer.id_number 59. Evaluate this SELECT statement: SELECT s.student_name, s.grade_point_avg, s.major_id, m.gpa_avg FROM student s, (SELECT major_id, AVG(grade_point_avg) gpa_avg FROM student m GROUP BY major_id) m WHERE s.major_id = m.major_id AND s.grade_point_avg > m.gpa_avg; What will be the result of this SELECT statement? A. The names of all students with a grade point average that is higher than the average grade point average in their major will be displayed. B. The names of all students with a grade point average that is higher than the average grade point average of all students will be displayed. C. The names of all students with a grade point average that is higher than the average grade point average of all students in each major will be displayed. D. A syntax error will be returned because the FROM clause CANNOT contain a subquery. 60. In the declaration section of a PL/SQL block, you create this variable: v_price NUMBER(4,2) NOT NULL; Which statement is true? A. The variable will be assigned the default value. B. The block will not execute because the variable must be initialized. C. The variable must be assigned a value in the executable section of the block. D. The variable contains a syntax error because a variable CANNOT use the NOT NULL constraint. 61. When would an index decrease the speed of a query? A. The table is small. B. The column is used in the WHERE clause. C. The column contains a wide range of values. D. The column contains a large number of null values. 62. Why would you NOT create an index on a column in the CLASS_SCHEDULE table? a. to reduce disk I/O b. to speed up row retrieval c. to speed up queries if the table has less than 50 rows d. to speed up queries that return less than 3% of the rows 63. For which result would you use a group function? a. to display the order date of orders in 'DD MON YYYY' format b. to convert the character string 'January 28, 2000' to a date format c. to produce a total of all the values in the COST column in the PRODUCT table d. to display all the values in the DESCRIPTION column in the PRODUCT table in lowercase 64. Which statement will Barbara use to create a private synonym for the EMPLOYEE table existing in her schema? a. CREATE SYNONYM emp

19 FOR employee; b. CREATE PUBLIC SYNONYM emp FOR barbara; c. CREATE PRIVATE SYNONYM emp FOR barbara.employee; d. CREATE PUBLIC emp SYNONYM FOR barbara.employee; 65. You have a command containing five lines of text stored in the SQL buffer. At the SQL prompt, you issue this command: DEL 2 3 What is the state of the buffer? a. The buffer is clear. b. The buffer is holding two lines of text. c. The buffer is holding five lines of text. d. The buffer is holding three lines of text. 66. Which command deletes the data in the EMPLOYEE table, its table structure, and any integrity constraints that reference the tables' primary and unique keys? a. DROP employee; b. DROP TABLE employee CASCADE CONSTRAINTS; c. TRUNCATE employee; ALTER TABLE employee DROP PRIMARY KEY CASCADE; d. Delete * FROM employee; ALTER TABLE employee DROP PRIMARY KEY CASCADE; 67. Examine the EMP_HIST_V view: EMP_HIST_V Name Type EMPLOYEE_ID NUMBER(6) NAME VARCHAR2(15) JOB VARCHAR2(9) MANAGER NUMBER(4) DATE_HIRED DATE SALARY NUMBER(7,2) BONUS NUMBER(7,2) DEPARTMENT_ID NUMBER(2) Which two statements will NOT successfully query the EMP_HIST_V view? (Choose two.) a. SELECT * FROM emp_hist_v; b. SELECT * FROM VIEW emp_hist_v; c. SELECT COUNT(*)

20 FROM emp_hist_v; d. SELECT COUNT(*) FROM VIEW emp_hist_v; 68.In which section of a PL/SQL block is a declared exception associated with a non-predefined Oracle Server exception? a. header b. exception c. executable d. declarative 69.Given the following Evaluate this SQL statement: SELECT id_number, description, SUM(price) WHERE price > 6.00 GROUP BY id_number ORDER BY manufacturer_id; Why will this statement cause an error? a. The ORDER BY clause should immediately follow the WHERE clause. b. The MANUFACTURER_ID column is not included in the SELECT clause. c. The ORDER BY clause cannot be used in a SELECT statement with a GROUP BY clause. d. The DESCRIPTION and MANUFACTURER_ID columns are not included in the GROUP BY clause. 70. Evaluate this CURSOR statement: DECLARE CURSOR price_cursor (v_price NUMBER(8,2)) IS SELECT id_number, description, manufacturer_id WHERE price > v_price; Why will this statement cause an error? a. A parameter is not defined. b. The SELECT statement is missing the INTO clause. c. A WHERE clause cannot be used in a CURSOR statement. d. The size of the variable does not need to be specified. 71. In the declaration section of a PL/SQL block, you create these variables:

21 v_quantity_on_hand, v_quantity_needed NUMBER(9); Why does this statement cause an error? a. The datatype is invalid. b. A parameter mode was not declared. c. A value must be assigned to each variable. d. A constraint for each variable was not declared. e. Multiple variables cannot be declared in the same statement. 72. Which type of constraint can be defined at the column or table level, and whose condition can apply to any column in the table, not just the column on which it is defined? a. CHECK b. UNIQUE c. NOT NULL d. FOREIGN KEY 73. Which statement about nested blocks in a PL/SQL program is true? a. A nested block becomes a statement. b. Nested blocks can only contain an executable section. c. A variable defined in a nested block is only visible to its enclosing block. d. Statements can only be nested in the executable section of a PL/SQL block. 74. Which statement would you use to display the structure of the PARTS_VU view? a. DESCRIBE parts_vu b. DESCRIBE user_views c. SELECT * FROM user_views WHERE lower(view) = parts_vu; d. SELECT * FROM user_objects WHERE lower(user_view) = parts_vu; 75. Evaluate this block of code: 1. BEGIN 2. DECLARE 3. v_new_tech_id NUMBER := ; 4. v_old_tech_id NUMBER := ; 5. v_rows_updated NUMBER := 1; 6. BEGIN 7. UPDATE service 8. SET technician_id = v_new_tech_id 9. WHERE technician_id = v_old_tech_id; 10. v_rows_updated := SQL%ROWCOUNT; 11. END; 12. TEXT_IO.PUT_LINE (TO_CHAR(v_rows_updated)); 13. END; Which line of this code will return an error? a. 2 b. 5 c. 7 d Which characteristic applies to an implicit cursor? a. will process only one row

22 b. will attempt only one fetch c. allows the programmer to control the number of fetches performed d. will perform only one fetch and will process all of the rows returned by the query 77. How does the USER_TABLES dictionary view differ from the ALL_TABLES data dictionary view? a. ALL_TABLES will display only the tables owned by the user. b. USER_TABLES will display only the tables owned by the user. c. ALL_TABLES will display only the tables on which the user has SELECT privileges. d. USER_TABLES will display all the tables on which the user has SELECT privileges. 78. How does the USER_TABLES dictionary view differ from the ALL_TABLES data dictionary view? a. ALL_TABLES will display only the tables owned by the user. b. USER_TABLES will display only the tables owned by the user. c. ALL_TABLES will display only the tables on which the user has SELECT privileges. d. SER_TABLES will display all the tables on which the user has SELECT privileges. 79. Evaluate the columns in the CUSTOMER and ORDER tables. CUSTOMER CUSTOMER_ID NAME CREDIT_LIMIT ACCT_OPEN_DATE ORDER ORDER_ID CUSTOMER_ID ORDER_DATE TOTAL NUMBER(5) VARCHAR2(25) NUMBER(8,2) DATE NUMBER(5) NUMBER(5) DATE NUMBER(8,2) Which scenario would require a subquery to return the desired results? a. You need to display the names of all the customers who placed an order today. b. You need to determine the number of orders placed this year by the customer with ID value c. You need to determine the average credit limit of all the customers who opened an account this year. d. You need to determine which customers have a credit limit greater than the customer with ID value Evaluate this IF statement: IF v_num < 10 THEN v_example := 1; ELSIF v_num < 15 THEN v_example := 2; ELSIF v_num < 20 THEN v_example := 3; ELSIF v_num < 39 THEN v_example := 4; ELSE v_example := 5; END IF; If V_NUM is 15, which value would be assigned to V_EXAMPLE? a. 1 b. 2 c. 3

23 d. 4 e Given the following Evaluate this SQL statement: DELETE WHERE order_date > TO_DATE(' ', 'DD.MM.YYYY'); What is the ID_NUMBER of the row to be deleted? a b c d. No value will be deleted. 82. Given the following The user needs to retrieve information on employees that have the same department id and salary as an employee id that they will enter. You want the query results to include employees that do not have a salary. Which statement will provide you with the desired results? a. SELECT * FROM employee WHERE (department, salary) NOT IN (SELECT department, salary) FROM employee WHERE employee_id = &1); b. SELECT * FROM employee WHERE (department_id, salary) IN (SELECT department_id, NVL(salary, 0) FROM employee WHERE employee_id = &1); c. SELECT * FROM employee

24 WHERE (department_id, NVL(salary, 0)) IN (SELECT department_id, NVL(salary, 0) FROM employee WHERE employee_id = &1); d. SELECT * FROM employee WHERE (department_id, salary) IN (SELECT department_id, salary) FROM employee WHERE employee_id = &1 AND salary IS NULL); 83. How does an implicit cursor differ from an explicit cursor? a. Explicit cursors are only for queries that return more than one row. b. Implicit cursors can be controlled using the OPEN, FETCH, and CLOSE statements. c. Explicit cursors are declared explicitly for all DML and PL/SQL SELECT statements. d. Implicit cursors are used to individually process each row returned by a multiple-row SELECT statement. 84. On which side of the outer join condition would you place the outer join symbol? a. the side with matching rows b. the side without matching rows c. both sides of the join condition d. neither side of the join condition 85. The TEACHER table contains these columns: Name Null? Type TEACHER_ID NOT NULL NUMBER(9) NAME VARCHAR2(25) SALARY NUMBER(7,2) SUBJECT_ID NOT NULL NUMBER(3) SUBJECT_DESCRIPTION VARCHAR2(2) You need to increase the salary of all science teachers by 8%. The SUBJECT_ID for science teachers is 011. Which statement will you use? a. UPDATE teacher SET salary = salary * 1.08 WHERE subject_description LIKE 'SCIENCE' b. UPDATE teacher SET salary = salary *.08 WHERE subject_description LIKE 'SCIENCE' AND subject_id = 011 c. UPDATE teacher SET salary = salary * 1.08 WHERE subject_id = 011; d. UPDATE teacher SET salary = salary + (salary *.08) WHERE subject_description LIKE 'SCIENCE' OR subject_id = Which single row function can NOT be used on a VARCHAR2 column? a. NVL

25 b. TRUNC c. ROUND d. SYSDATE 87. Given the following You must remove products from your system whose quantity is too low to be listed in your catalog and whose manufacturer, wallpp0925, is now out of business. You want to delete any products from inventory that were produced by this manufacturer, ordered before December 31, 1997, and have a quantity of less than 250. Which script will you use? a. DROP WHERE quantity < 250 AND order_date < 31-DEC-97 AND manufacturer_id = wallpp0925; b. DROP WHERE quantity < 250 AND order_date > 31-DEC-97 AND manufacturer_id = 'wallpp0925'; c. DELETE WHERE quantity < 250 AND order_date < '31-DEC-1997' AND manufacturer_id = 'wallpp0925'; d. DELETE WHERE quantity < 250 AND order_date =< '31-DEC-1997' AND NOT manufacturer_id = wallpp0925; 88. Given the following You query the database with this SQL statement: SELECT MIN(manufacturer_id) ;

26 Which value is displayed? a. ejmad0225 b. sundel0525 c. belsot0426 d. The statement will not execute 89.Evaluate this SQL* Plus command: COLUMN product_name HEADING 'Product Name' FORMAT A20 Which two tasks will this command accomplish? (Choose two.) a. It will center the column heading of the PRODUCT_NAME column. b. It will set the PRODUCT_NAME column heading to 'Product Name'. c. It will limit the PRODUCT_NAME column heading to 20 characters. d. It will set the display width of the PRODUCT_NAME column to 20. e. It will display the current settings for the PRODUCT_NAME column. 90. Which statement will you use to display only the name, view definition, and the length of the view definition of the EMPLOYEE_HIST view? a. SELECT * FROM user_views WHERE view_name = 'EMPLOYEE_HIST'; b. SELECT view_name, text, text_length FROM user_views WHERE view_name = 'EMPLOYEE_HIST'; c. SELECT view_name, text, text_length FROM VIEW user_objects WHERE view_name = 'EMPLOYEE_HIST d. SELECT VIEW view_name, text, text_length FROM all_objects WHERE view_name = 'EMPLOYEE_HIST'; 91. Evaluate this executable section of a PL/SQL block: BEGIN SELECT last_name, first_name INTO v_last_name, v_first_name FROM student WHERE student_id = 3950; WHEN NO_DATA_FOUND THEN DBMS_OUTPUT.PUT_LINE ('Student not found'); END; Which result will the code provide? A. An error because there is an exception in the executable section of the block. B. An error because a SELECT statement with an INTO clause is not allowed in a PL/SQL block. C. The first and last name values in the PL/SQL variables will be inserted into the STUDENT table. D. The first and last name values of the student with student id 3950 will be stored in the PL/SQL variables.

27 92. Which data dictionary view could you query to display the names of tables you have access to? a. USER_VIEWS b. USER_TABLES c. ALL_OBJECTS d. USER_OBJECTS 93. Which privilege is an object privilege? A. INDEX B. DROP USER C. CREATE SESSION D. BACKUP ANY TABLE 94. Which SQL statement creates the PARTS_456874_VU view that contains the ID_NUMBER, DESCRIPTION, and QUANTITY columns for MANUFACTURER_ID from the INVENTORY table and does not allow the manufacturer values to be changed through the view? a. CREATE VIEW parts_456874_vu AS SELECT id_number, description, quantity FROM inventory WITH CHECK CONSTRAINT; b. CREATE VIEW parts_456874_vu AS SELECT id_number, description, quantity FROM inventory HAVING manufacturer_id = WITH READ ONLY; c. CREATE VIEW parts_456874_vu AS SELECT id_number, description, quantity FROM inventory WHERE manufacturer_id = WITH READ ONLY; d. CREATE VIEW parts_456874_vu AS SELECT id_number, description, quantity FROM inventory WHERE manufacturer_id = WITH CHECK OPTION; 95. Evaluate this cursor declaration: 1. DECLARE 2. CURSOR cust_cursor (p_cust_id, p_last_name) 3. IS 4. SELECT cust_id, first_name, last_name, credit_limit 5. FROM customer 6. WHERE cust_id = p_cust_id 7. AND last_name = p_last_name; Which line causes an error? A. 2 B. 3 C. 4 D. 5 E For which task would it be most appropriate to use a PL/SQL IF-THEN-ELSE statement?

28 a. to add four new manufacturers to the MANUFACTURER table b. to increase the price values by 25% for all the items in inventory c. to increase the price values by 25% for all items in inventory that were manufactured by the Roomco Company d. to decrease the price values by 25% for items with more than 500 in stock and by 15% for items with more than 250 in stock 97. Examine the EMP_HIST_V view: EMP_HIST_V Name Type EMPLOYEE_ID NUMBER(6) NAME VARCHAR2(15) JOB VARCHAR2(9) MANAGER NUMBER(4) DATE_HIRED DATE SALARY NUMBER(7,2) BONUS NUMBER(7,2) DEPARTMENT_ID NUMBER(2) You need to query the EMP_HIST_V view. You must determine the average salary for all employees assigned to department 10 that were hired prior to January 1, Which statement will you use? A. SELECT department_id, AVG(salary) FROM emp_hist_v WHERE date_hired < '01-JAN-1995' AND department_id = 10; B. SELECT department_id, AVG(salary) FROM emp_hist_v VIEW WHERE date_hired < '01-JAN-1995' AND department_id = 10; C. SELECT department_id, AVG(salary) FROM VIEW emp_hist_v WHERE date_hired < '01-JAN-1995' AND department_id = 10 GROUP BY department_id; D. SELECT department_id, AVG(salary) FROM emp_hist_v WHERE date_hired < '01-JAN-1995' AND department_id = 10 GROUP BY department_id; 98. Evaluate this SQL statement: SELECT i.id_number, m.manufacturer_id i, inventory m WHERE i.manufacturer_id = m.id_number; Which type of join is used in this statement? a. self b. outer c. equijoin

29 d. non-equijoin 99. Which statement regarding cursor FOR loop guidelines is true? A. They require an OPEN statement. B. They require a terminating condition. C. They do not require a FETCH statement. D. They must declare the record that controls the loop. 100.Given the following You query the database with this SQL statement: SELECT FROM GROUP BY manufacturer_id, SUM(price) inventory manufacturer_id; Which MANUFACTURER_ID value is displayed first? a. sundel0525 b. belsot0426 c. ejmadb0225 d. packex Which clause is required in a SELECT statement within a PL/SQL block? A. INTO B. WHERE C. HAVING D. GROUP BY E. ORDER BY 102.In the executable section of a PL/SQL block, you include this statement: inventory (55) := 'Walt'; Which task will this accomplish? a. A constant will be assigned a value. b. A scalar variable will be assigned a value. c. A PL/SQL table element will be assigned a number value. d. PL/SQL table element will be assigned a character string value. 103.Evaluate this PL/SQL block: BEGIN UPDATE teacher SET salary = salary * 1.05 WHERE subject_id IN (101, 102, 103); COMMIT;

30 EXCEPTION WHEN SQL%NOTFOUND = TRUE THEN dbms_output.put_line(to_char(sql%rowcount)); END; What would cause output to be displayed? A. An error occurs B. No rows were updated. C. Only one row was updated. D. More than one row was updated Given the following Evaluate this statement: CREATE TABLE sale_items (id_number NUMBER(9), description VARCHAR2(25)) AS SELECT id_number, description WHERE quantity > 500; Why will this statement cause an error? A. A clause is missing. B. A keyword is missing. C. The WHERE clause cannot be used when creating a table. D. The datatypes in the new table do not need to be defined Which script will you execute to create new user DAVE and give him the ability to connect to the database and the ability to create tables, sequences, and procedures? a. CREATE USER dave IDENTIFIED BY dave18; GRANT create table, create sequence, create procedure TO dave; b. CREATE USER dave IDENTIFIED BY dave18; GRANT create session, create table, create sequence, create procedure TO dave; c. CREATE dave IDENTIFIED BY dave18; GRANT create connect, table, sequence, procedure TO dave;

31 d. CREATE OR REPLACE USER dave IDENTIFIED BY dave18; GRANT create session, table, sequence, procedure; 106. Review this SQL statement: SELECT FROM WHERE ORDER BY i. manufacturer_id, m.id_number inventory i, manufacturer m i.manufacturer_id = m.id_number inventory.description; This statement fails when executed. Which change will correct the problem? A. Use the table alias in the ORDER BY clause. B. Remove the table aliases from the WHERE clause. C. Use the table names instead of the table aliases in the WHERE clause. D. Remove the table name from the ORDER BY clause, and use only the column name Given the following???????????????? A sort order of ASC or DESC must be specified in the ORDER BY clause. Remove the column alias from the WHERE clause and use the column name. Remove the column alias from the ORDER BY clause and use the column name. Enclose all of the column aliases in single quotes instead of double quotes Which clause could you use to restrict values returned by a group function? a. WHERE b. HAVING c. ORDER BY d. A group function cannot be restricted 109. What is an appropriate label for a nested loop? A. --Inner loop B. &&Inner_loop C. /*Inner Loop*/ D. <<Inner_loop>> 110. Which system privilege may be granted to a role? A. ALTER B. EXECUTE C. REFERENCES D. BACKUP ANY TABLE 111. What is the syntax for removing a primary key constraint and all its dependent constraints? a. ALTER TABLE table DROP PRIMARY KEY CASCADE;

32 b. ALTER TABLE table REMOVE CONSTRAINT PRIMARY KEY CASCADE; c. ALTER TABLE table DISABLE CONSTRAINT PRIMARY KEY CASCADE; d. A primary key constraint cannot be removed Examine this declaration section of a PL/SQL block: DECLARE TYPE product_table_type IS TABLE OF product%rowtype INDEX BY BINARY_INTEGER; product_table product_table_type; Evaluate this statement: product_table(10).manufacturer_id := 5; Which statement is true? A. The statement sets the MANUFACTURER_ID in the PRODUCT table to 10. B. The statement sets the MANUFACTURER_ID in the PRODUCT table to 5. C. The statement assigns the MANUFACTURER_ID field in record 10 of the PL/SQL table the value of 5. D. The statement assigns the MANUFACTURER_ID field in record 5 of the PL/SQL table the value of You need to create the ELEMENT table. The atomic weights of elements have varying decimal places. For example, values could be 4, 4.35, or Which datatype would be most appropriate for the atomic weight values? A. LONG B. NUMBER C. NUMBER(p,s) D. None 114. Which action will cause an automatic rollback? a. a GRANT command b. a CREATE command c. the system crashes d. exiting from SQL*Plus without first issuing a COMMIT command 115. Which type of commands are supported by PL/SQL? A. DDL B. DCL C. DML D. No commands are supported by PL/SQL 116. In the declaration section of a PL/SQL block, you create this variable: v_price_increase BOOLEAN := 0; Why does this statement cause an error? A. A value must be assigned. B. Constraints are not allowed. C. Default values are not allowed. D. The variable is initialized incorrectly.

33 117. Given the following You want to display all of the product identification numbers of products if there are more than 100 of the product in stock. You want the product numbers displayed alphabetically by the manufacturer, then by the product number from lowest to highest. Which statement will you use to achieve the required results? a. SELECT id_number WHERE quantity > 100 ORDER BY manufacturer_id, id_number; b. SELECT id_number WHERE quantity => 100 SORT BY manufacturer_id, id_number; c. SELECT id_number WHERE quantity > 100 ORDER BY manufacturer_id, id_number DESC; d. SELECT id_number WHERE quantity > 100 SORT BY manufacturer_id, id_number; 118. You query the database with this SQL statement: SELECT price WHERE price BETWEEN 1 AND 50 OR (price IN(25, 70, 95) AND price BETWEEN 25 AND 75); Which value could the statement retrieve? Which SELECT statement could you use if you wanted to display unique combinations of the ID_NUMBER and MANUFACTURER_ID values from the INVENTORY table? A. SELECT DISTINCT manufacturer_id

34 B. SELECT id_number, manufacturer_id ; C. SELECT DISTINCT id_number, manufacturer_id ; D. SELECT id_number, manufacturer_id DISTINCT ; 120. You need to create a variable in a PL/SQL block to allow all the rows and columns from the CUSTOMER table to be retrieved using a single SELECT statement. Which declaration statement should you use to achieve this result? a. DECLARE TYPE customer_table_type IS TABLE OF customer%rowtype INDEX BY BINARY_INTEGER; customer_table customer_table_type; b. DECLARE TYPE customer_table_type IS TABLE OF customer%type INDEX BY BINARY_INTEGER; customer_table customer_table_type; c. DECLARE customer_table_type customer%rowtype INDEX BY BINARY_INTEGER; customer_table customer_table_type; d. DECLARE customer_table_type customer%rowtype; customer_table customer_table_type; 121. Which three values are displayed by the DESCRIBE command? (Choose three.) A. table owner B. column names C. table name D. column datatypes E. NOT NULL columns 122. In which section of a PL/SQL block would you place a RAISE statement? A. header B. exception C. executable D. declarative 123. You accidentally changed all the TECHNICIAN_ID values to using the UPDATE command without a WHERE clause. Which command could you issue to undo these changes? a. EXIT b. QUIT c. COMMIT d. ROLLBACK 124. You issue this statement: CREATE FORCE VIEW parts_vu (company, contact) AS SELECT manufacturer_name, contact_name

35 WITH READ ONLY; Which command can be issued on the PARTS_VU view? A. UPDATE B. DELETE C. SELECT D. INSERT 125.Which operator could be used to test a column for NULL values? A. = B.!= C. <> D. = NULL E. IS NULL 126.Which predefined Oracle Server exception would you use to handle an error caused by a SQL statement that returns more than one row? a. VALUE_ERROR b. NO_DATA_FOUND c. TOO_MANY_ROWS d. ACCESS_INTO_NULL e. COLLECTION_IS_NULL 127.Which two operators can be used in an outer join condition? (Choose two.) A. = B. OR C. IN D. AND 128.Evaluate this PL/SQL block: DECLARE v_low NUMBER := 1; v_high NUMBER := 6; v_count NUMBER := 2; BEGIN FOR i IN v_low..v_high LOOP v_count := v_count + 1; END LOOP; END; How many times will the loop execute? A. 0 B. 1 C. 4 D. 6 E Which script displays the ORDER_DATE value of '23-MAY-00' as '01-JAN-00'? a. SELECT ROUND(order_date, 'DAY') ; b. SELECT ROUND(order_date, 'YEAR') ; c. SELECT ROUND(order_date, 'MONTH')

36 FROM inventory; d. SELECT ROUND(TO_CHAR(order_date, 'YYYY')) ; 130.Which section of a PL/SQL block contains the keyword BEGIN? a. end b. executable c. declarative d. exception handling 131.Which SQL command would you use to remove the PARTS_VU view? A. DROP parts_vu; B. DELETE parts_vu; C. DROP VIEW parts_vu; D. DELETE VIEW parts_vu; 132.Which SELECT statement will return a numeric value? a. SELECT order_date / 7 ; b. SELECT (order_date + 366/24) ; c. SELECT (SYSDATE, order_date) / 7 ; d. SELECT (SYSDATE - order_date) / 7 ; 133. You query the database with this SQL statement: SELECT manufacturer_id WHERE manufacturer_id LIKE '%N\%P\%O%' ESCAPE '\'; For which character pattern is the LIKE operator searching? a. NPO b. N\P\O c. N%P%O d. N\%P\%O 134. Which data dictionary view would you query to list only the views you own? A. ALL_VIEWS B. USER_VIEWS C. ALL_OBJECTS D. USER_OBJECTS 135. The STUDENT table contains these columns: ID FIRST_NAME LAST_NAME NUMBER(9) VARCHAR2(25) VARCHAR2(25) Evaluate this SQL statement:

37 SELECT * FROM student WHERE id = (SELECT id FROM student WHERE UPPER(first_name) = 'KATE' AND UPPER(last_name) = 'HENRY'); What would cause this statement to fail? A. There are no students named Kate Henry. B. There is more than one student named Kate. C. There is more than one student named Kate Henry. D. The FIRST_NAME and LAST_NAME values in the database are in lowercase For which two types of constraints are indexes automatically created? (Choose two.) a. CHECK b. UNIQUE c. NOT NULL d. PRIMARY KEY e. FOREIGN KEY 137. Evaluate this SELECT statement: SELECT employee_id, name FROM employee WHERE employee_id NOT IN (SELECT employee_id FROM employee WHERE department_id = 30 AND job = 'CLERK'); What would happen if the inner query returned a NULL value? a. No rows would be selected from the EMPLOYEE table. b. All the EMPLOYEE_ID and NAME values in the EMPLOYEE table would be displayed. c. Only the rows with EMPLOYEE_ID values equal to null would be included in the results. d. A syntax error would be returned Evaluate this command: TRUNCATE TABLE inventory; Which two statements about this TRUNCATE TABLE command are true? (Choose two.) A. This statement will retain the structure of the INVENTORY table. B. You must be the owner of the INVENTORY table to use this command. C. The results of this statement can be rolled back using the ROLLBACK command. D. This statement will permanently remove all the data from the INVENTORY table. E. This statement will produce the same result as the DROP TABLE inventory command. Why would you use the RAISE_APPLICATION_ERROR procedure in a PL/SQL block? A. to trap a user-defined exception B. to trap a TOO_MANY_ROWS exception C. to raise a TOO_MANY_ROWS exception D. to issue a user-defined error message 140. Evaluate this SQL statement: SELECT id_number

Table of Contents. PDF created with FinePrint pdffactory Pro trial version

Table of Contents. PDF created with FinePrint pdffactory Pro trial version Table of Contents Course Description The SQL Course covers relational database principles and Oracle concepts, writing basic SQL statements, restricting and sorting data, and using single-row functions.

More information

Oracle Database 11g: SQL and PL/SQL Fundamentals

Oracle Database 11g: SQL and PL/SQL Fundamentals Oracle University Contact Us: +33 (0) 1 57 60 20 81 Oracle Database 11g: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn In this course, students learn the fundamentals of SQL and PL/SQL

More information

Oracle Syllabus Course code-r10605 SQL

Oracle Syllabus Course code-r10605 SQL Oracle Syllabus Course code-r10605 SQL Writing Basic SQL SELECT Statements Basic SELECT Statement Selecting All Columns Selecting Specific Columns Writing SQL Statements Column Heading Defaults Arithmetic

More information

Topics Fundamentals of PL/SQL, Integration with PROIV SuperLayer and use within Glovia

Topics Fundamentals of PL/SQL, Integration with PROIV SuperLayer and use within Glovia Topics Fundamentals of PL/SQL, Integration with PROIV SuperLayer and use within Glovia 1. Creating a Database Alias 2. Introduction to SQL Relational Database Concept Definition of Relational Database

More information

Oracle Database: SQL and PL/SQL Fundamentals NEW

Oracle Database: SQL and PL/SQL Fundamentals NEW Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training delivers the fundamentals of SQL and PL/SQL along with the

More information

Creating and Managing Tables Schedule: Timing Topic

Creating and Managing Tables Schedule: Timing Topic 9 Creating and Managing Tables Schedule: Timing Topic 30 minutes Lecture 20 minutes Practice 50 minutes Total Objectives After completing this lesson, you should be able to do the following: Describe the

More information

Oracle Database: SQL and PL/SQL Fundamentals Ed 2

Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals

More information

5. Single-row function

5. Single-row function 1. 2. Introduction Oracle 11g Oracle 11g Application Server Oracle database Relational and Object Relational Database Management system Oracle internet platform System Development Life cycle 3. Writing

More information

1Z Oracle Database 11g - SQL Fundamentals I Exam Summary Syllabus Questions

1Z Oracle Database 11g - SQL Fundamentals I Exam Summary Syllabus Questions 1Z0-051 Oracle Database 11g - SQL Fundamentals I Exam Summary Syllabus Questions Table of Contents Introduction to 1Z0-051 Exam on Oracle Database 11g - SQL Fundamentals I 2 Oracle 1Z0-051 Certification

More information

1 Writing Basic SQL SELECT Statements 2 Restricting and Sorting Data

1 Writing Basic SQL SELECT Statements 2 Restricting and Sorting Data 1 Writing Basic SQL SELECT Statements Objectives 1-2 Capabilities of SQL SELECT Statements 1-3 Basic SELECT Statement 1-4 Selecting All Columns 1-5 Selecting Specific Columns 1-6 Writing SQL Statements

More information

INDEX. 1 Basic SQL Statements. 2 Restricting and Sorting Data. 3 Single Row Functions. 4 Displaying data from multiple tables

INDEX. 1 Basic SQL Statements. 2 Restricting and Sorting Data. 3 Single Row Functions. 4 Displaying data from multiple tables INDEX Exercise No Title 1 Basic SQL Statements 2 Restricting and Sorting Data 3 Single Row Functions 4 Displaying data from multiple tables 5 Creating and Managing Tables 6 Including Constraints 7 Manipulating

More information

Introduction to Computer Science and Business

Introduction to Computer Science and Business Introduction to Computer Science and Business The Database Programming with PL/SQL course introduces students to the procedural language used to extend SQL in a programatic manner. This course outline

More information

Oracle Database: Introduction to SQL/PLSQL Accelerated

Oracle Database: Introduction to SQL/PLSQL Accelerated Oracle University Contact Us: Landline: +91 80 67863899 Toll Free: 0008004401672 Oracle Database: Introduction to SQL/PLSQL Accelerated Duration: 5 Days What you will learn This Introduction to SQL/PLSQL

More information

Oracle Database: Introduction to SQL Ed 2

Oracle Database: Introduction to SQL Ed 2 Oracle University Contact Us: +40 21 3678820 Oracle Database: Introduction to SQL Ed 2 Duration: 5 Days What you will learn This Oracle Database 12c: Introduction to SQL training helps you write subqueries,

More information

Introduction to SQL/PLSQL Accelerated Ed 2

Introduction to SQL/PLSQL Accelerated Ed 2 Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Introduction to SQL/PLSQL Accelerated Ed 2 Duration: 5 Days What you will learn This Introduction to SQL/PLSQL Accelerated course

More information

Course Outline and Objectives: Database Programming with SQL

Course Outline and Objectives: Database Programming with SQL Introduction to Computer Science and Business Course Outline and Objectives: Database Programming with SQL This is the second portion of the Database Design and Programming with SQL course. In this portion,

More information

ORACLE TRAINING. ORACLE Training Course syllabus ORACLE SQL ORACLE PLSQL. Oracle SQL Training Syllabus

ORACLE TRAINING. ORACLE Training Course syllabus ORACLE SQL ORACLE PLSQL. Oracle SQL Training Syllabus ORACLE TRAINING ORACLE Training Course syllabus ORACLE SQL ORACLE PLSQL Oracle SQL Training Syllabus Introduction to Oracle Database List the features of Oracle Database 11g Discuss the basic design, theoretical,

More information

Oracle Database: Introduction to SQL

Oracle Database: Introduction to SQL Oracle University Contact Us: (+202) 35 35 02 54 Oracle Database: Introduction to SQL Duration: 5 Days What you will learn View a newer version of this course This Oracle Database: Introduction to SQL

More information

AO3 - Version: 2. Oracle Database 11g SQL

AO3 - Version: 2. Oracle Database 11g SQL AO3 - Version: 2 Oracle Database 11g SQL Oracle Database 11g SQL AO3 - Version: 2 3 days Course Description: This course provides the essential SQL skills that allow developers to write queries against

More information

Oracle Database: Introduction to SQL

Oracle Database: Introduction to SQL Oracle University Contact Us: +27 (0)11 319-4111 Oracle Database: Introduction to SQL Duration: 5 Days What you will learn This Oracle Database: Introduction to SQL training helps you write subqueries,

More information

Oracle Database: SQL and PL/SQL Fundamentals

Oracle Database: SQL and PL/SQL Fundamentals Oracle University Contact Us: 001-855-844-3881 & 001-800-514-06-9 7 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training

More information

Oracle Database: Introduction to SQL

Oracle Database: Introduction to SQL Oracle Database: Introduction to SQL What you will learn Understanding the basic concepts of relational databases ensure refined code by developers. This course helps the participants to write subqueries,

More information

Introduction to Computer Science and Business

Introduction to Computer Science and Business Introduction to Computer Science and Business This is the second portion of the Database Design and Programming with SQL course. In this portion, students implement their database design by creating a

More information

Data Manipulation Language

Data Manipulation Language Manipulating Data Objectives After completing this lesson, you should be able to do the following: Describe each data manipulation language (DML) statement Insert rows into a table Update rows in a table

More information

Section I : Section II : Question 1. Question 2. Question 3.

Section I : Section II : Question 1. Question 2. Question 3. Computer Science, 60-415 Midterm Examiner: Ritu Chaturvedi Date: Oct. 27 th, 2011 Student Name: Student Number: INSTRUCTIONS (Please Read Carefully) Examination Period is 1 hour and 15 minutes Answer all

More information

Manipulating Data. Copyright 2004, Oracle. All rights reserved.

Manipulating Data. Copyright 2004, Oracle. All rights reserved. Manipulating Data Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Describe each data manipulation language (DML) statement

More information

Oracle Database 10g: SQL Fundamentals I

Oracle Database 10g: SQL Fundamentals I Oracle Database 10g: SQL Fundamentals I Student Guide Volume I D17108GC21 Edition 2.1 December 2006 D48183 Authors Chaitanya Koratamaddi Nancy Greenberg Technical Contributors and Reviewers Wayne Abbott

More information

Oracle Database 12c SQL Fundamentals

Oracle Database 12c SQL Fundamentals Course Overview This course takes a unique approach to SQL training in that it incorporates data modeling theory, relational database theory, graphical depictions of theoretical concepts and numerous examples

More information

Oracle Database 10g: SQL Fundamentals I

Oracle Database 10g: SQL Fundamentals I Oracle Database 10g: SQL Fundamentals I Volume I Student Guide D17108GC11 Edition 1.1 August 2004 D39766 Author Nancy Greenberg Technical Contributors and Reviewers Wayne Abbott Christian Bauwens Perry

More information

Oracle Database 11g: SQL Fundamentals I

Oracle Database 11g: SQL Fundamentals I Oracle Database 11g: SQL Fundamentals I Volume I Student Guide D49996GC11 Edition 1.1 April 2009 D59980 Authors Puja Singh Brian Pottle Technical Contributors and Reviewers Claire Bennett Tom Best Purjanti

More information

Oracle Database 11g: Introduction to SQLRelease 2

Oracle Database 11g: Introduction to SQLRelease 2 Oracle University Contact Us: 0180 2000 526 / +49 89 14301200 Oracle Database 11g: Introduction to SQLRelease 2 Duration: 5 Days What you will learn In this course students learn the concepts of relational

More information

Oracle Database 10g: Introduction to SQL

Oracle Database 10g: Introduction to SQL ORACLE UNIVERSITY CONTACT US: 00 9714 390 9000 Oracle Database 10g: Introduction to SQL Duration: 5 Days What you will learn This course offers students an introduction to Oracle Database 10g database

More information

ÇALIŞMA TEST SORULARI

ÇALIŞMA TEST SORULARI 1. A table has the following definition: EMPLOYEES( EMPLOYEE_ID NUMBER(6) NOT NULL, LAST_NAME VARCHAR2(10) NOT NULL, MANAGER_ID VARCHAR2(6)) and contains the following rows: (1001, 'Bob Bevan', '200')

More information

Sisteme Informatice şi Standarde Deschise (SISD) Curs 7 Standarde pentru programarea bazelor de date (1)

Sisteme Informatice şi Standarde Deschise (SISD) Curs 7 Standarde pentru programarea bazelor de date (1) Administrarea Bazelor de Date Managementul în Tehnologia Informaţiei Sisteme Informatice şi Standarde Deschise (SISD) 2009-2010 Curs 7 Standarde pentru programarea bazelor de date (1) 23.11.2009 Sisteme

More information

Oracle Database 11g: SQL Fundamentals I

Oracle Database 11g: SQL Fundamentals I Oracle Database 11g: SQL Fundamentals I Volume II Student Guide D49996GC20 Edition 2.0 October 2009 D63148 Authors Salome Clement Brian Pottle Puja Singh Technical Contributors and Reviewers Anjulaponni

More information

GIFT Department of Computing Science Data Selection and Filtering using the SELECT Statement

GIFT Department of Computing Science Data Selection and Filtering using the SELECT Statement GIFT Department of Computing Science [Spring 2013] CS-217: Database Systems Lab-2 Manual Data Selection and Filtering using the SELECT Statement V1.0 4/12/2016 Introduction to Lab-2 This lab reinforces

More information

Oracle Database SQL Basics

Oracle Database SQL Basics Oracle Database SQL Basics Kerepes Tamás, Webváltó Kft. tamas.kerepes@webvalto.hu 2015. február 26. Copyright 2004, Oracle. All rights reserved. SQL a history in brief The relational database stores data

More information

Database Foundations. 6-4 Data Manipulation Language (DML) Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Database Foundations. 6-4 Data Manipulation Language (DML) Copyright 2015, Oracle and/or its affiliates. All rights reserved. Database Foundations 6-4 Roadmap You are here Introduction to Oracle Application Express Structured Query Language (SQL) Data Definition Language (DDL) Data Manipulation Language (DML) Transaction Control

More information

Oracle Developer Track Course Contents. Mr. Sandeep M Shinde. Oracle Application Techno-Functional Consultant

Oracle Developer Track Course Contents. Mr. Sandeep M Shinde. Oracle Application Techno-Functional Consultant Oracle Developer Track Course Contents Sandeep M Shinde Oracle Application Techno-Functional Consultant 16 Years MNC Experience in India and USA Trainer Experience Summary:- Sandeep M Shinde is having

More information

BraindumpsVCE. Best vce braindumps-exam vce pdf free download

BraindumpsVCE.   Best vce braindumps-exam vce pdf free download BraindumpsVCE http://www.braindumpsvce.com Best vce braindumps-exam vce pdf free download Exam : 1z1-061 Title : Oracle Database 12c: SQL Fundamentals Vendor : Oracle Version : DEMO Get Latest & Valid

More information

Táblák tartalmának módosítása. Copyright 2004, Oracle. All rights reserved.

Táblák tartalmának módosítása. Copyright 2004, Oracle. All rights reserved. Táblák tartalmának módosítása Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Describe each data manipulation language (DML)

More information

CONCAT SUBSTR LOWER (*) All three will be evaluated simultaneously. Correct

CONCAT SUBSTR LOWER (*) All three will be evaluated simultaneously. Correct 1. You query the database with this SQL statement: SELECT CONCAT(last_name, (SUBSTR(LOWER(first_name), 4))) Default Password FROM employees; Which function will be evaluated first? CONCAT SUBSTR LOWER

More information

SQL Interview Questions

SQL Interview Questions SQL Interview Questions SQL stands for Structured Query Language. It is used as a programming language for querying Relational Database Management Systems. In this tutorial, we shall go through the basic

More information

1z Oracle Database SQL Expert

1z Oracle Database SQL Expert 1z0-047 Oracle Database SQL Expert Version 1.6 QUESTION NO: 1 Which three possible values can be set for the TIME_ZONE session parameter by using the ALTER SESSION command? (Choose three.) E. 'os' local

More information

Using DDL Statements to Create and Manage Tables. Copyright 2006, Oracle. All rights reserved.

Using DDL Statements to Create and Manage Tables. Copyright 2006, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables Objectives After completing this lesson, you should be able to do the following: Categorize the main database objects Review the table structure List the

More information

normalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model

normalization are being violated o Apply the rule of Third Normal Form to resolve a violation in the model Database Design Section1 - Introduction 1-1 Introduction to the Oracle Academy o Give examples of jobs, salaries, and opportunities that are possible by participating in the Academy. o Explain how your

More information

Exam Actual. Higher Quality. Better Service! QUESTION & ANSWER

Exam Actual. Higher Quality. Better Service! QUESTION & ANSWER Higher Quality Better Service! Exam Actual QUESTION & ANSWER Accurate study guides, High passing rate! Exam Actual provides update free of charge in one year! http://www.examactual.com Exam : 1Z0-047 Title

More information

SQL+PL/SQL. Introduction to SQL

SQL+PL/SQL. Introduction to SQL SQL+PL/SQL CURRICULUM Introduction to SQL Introduction to Oracle Database List the features of Oracle Database 12c Discuss the basic design, theoretical, and physical aspects of a relational database Categorize

More information

SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database.

SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database. SQL SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database. SQL*Plus SQL*Plus is an application that recognizes & executes SQL commands &

More information

Creating Other Schema Objects

Creating Other Schema Objects Creating Other Schema Objects Objectives After completing this lesson, you should be able to do the following: Create simple and complex views Retrieve data from views Database Objects Object Table View

More information

Creating Other Schema Objects. Copyright 2004, Oracle. All rights reserved.

Creating Other Schema Objects. Copyright 2004, Oracle. All rights reserved. Creating Other Schema Objects Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Create simple and complex views Retrieve data

More information

Oracle 1Z Oracle Database 11g SQL Fundamentals I. Download Full Version :

Oracle 1Z Oracle Database 11g SQL Fundamentals I. Download Full Version : Oracle 1Z1-051 Oracle Database 11g SQL Fundamentals I Download Full Version : https://killexams.com/pass4sure/exam-detail/1z1-051 QUESTION: 238 You need to perform these tasks: - Create and assign a MANAGER

More information

2. Programming written ( main theme is to test our data structure knowledge, proficiency

2. Programming written ( main theme is to test our data structure knowledge, proficiency ORACLE Job Placement Paper Paper Type : General - other 1. Tech + Aptitude written 2. Programming written ( main theme is to test our data structure knowledge, proficiency sorting searching algorithms

More information

Introduction to Oracle9i: SQL

Introduction to Oracle9i: SQL Oracle 1z0-007 Introduction to Oracle9i: SQL Version: 22.0 QUESTION NO: 1 Oracle 1z0-007 Exam Examine the data in the EMPLOYEES and DEPARTMENTS tables. You want to retrieve all employees, whether or not

More information

ORACLE Job Placement Paper. Paper Type : General - other

ORACLE Job Placement Paper. Paper Type : General - other ORACLE Job Placement Paper Paper Type : General - other 1. Tech + Aptitude written 2. Programming written ( main theme is to test our data structure knowledge, proficiency sorting searching algorithms

More information

Table of Contents. Oracle SQL PL/SQL Training Courses

Table of Contents. Oracle SQL PL/SQL Training Courses Table of Contents Overview... 7 About DBA University, Inc.... 7 Eligibility... 8 Pricing... 8 Course Topics... 8 Relational database design... 8 1.1. Computer Database Concepts... 9 1.2. Relational Database

More information

Database Foundations. 6-3 Data Definition Language (DDL) Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Database Foundations. 6-3 Data Definition Language (DDL) Copyright 2015, Oracle and/or its affiliates. All rights reserved. Database Foundations 6-3 Roadmap You are here Introduction to Oracle Application Express Structured Query Language (SQL) Data Definition Language (DDL) Data Manipulation Language (DML) Transaction Control

More information

1Z0-144 Q&As Oracle Database 11g: Program with PL/ SQL

1Z0-144 Q&As Oracle Database 11g: Program with PL/ SQL CertBus.com 1Z0-144 Q&As Oracle Database 11g: Program with PL/ SQL Pass Oracle 1Z0-144 Exam with 100% Guarantee Free Download Real Questions & Answers PDF and VCE file from: 100% Passing Guarantee 100%

More information

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database: SQL Fundamentals I. Q&As: 292

Vendor: Oracle. Exam Code: 1Z Exam Name: Oracle Database: SQL Fundamentals I. Q&As: 292 Vendor: Oracle Exam Code: 1Z1-051 Exam Name: Oracle Database: SQL Fundamentals I Q&As: 292 QUESTION 1 Evaluate the SQL statement: TRUNCATE TABLE DEPT; Which three are true about the SQL statement? (Choose

More information

2 PL/SQL - fundamentals Variables and Constants Operators SQL in PL/SQL Control structures... 7

2 PL/SQL - fundamentals Variables and Constants Operators SQL in PL/SQL Control structures... 7 Table of Contents Spis treści 1 Introduction 1 2 PLSQL - fundamentals 1 2.1 Variables and Constants............................ 2 2.2 Operators.................................... 5 2.3 SQL in PLSQL.................................

More information

UNIT II PL / SQL AND TRIGGERS

UNIT II PL / SQL AND TRIGGERS UNIT II PL / SQL AND 1 TRIGGERS TOPIC TO BE COVERED.. 2.1 Basics of PL / SQL 2.2 Datatypes 2.3 Advantages 2.4 Control Structures : Conditional, Iterative, Sequential 2.5 Exceptions: Predefined Exceptions,User

More information

Contents I Introduction 1 Introduction to PL/SQL iii

Contents I Introduction 1 Introduction to PL/SQL iii Contents I Introduction Lesson Objectives I-2 Course Objectives I-3 Human Resources (HR) Schema for This Course I-4 Course Agenda I-5 Class Account Information I-6 Appendixes Used in This Course I-7 PL/SQL

More information

Chapter-14 SQL COMMANDS

Chapter-14 SQL COMMANDS Chapter-14 SQL COMMANDS What is SQL? Structured Query Language and it helps to make practice on SQL commands which provides immediate results. SQL is Structured Query Language, which is a computer language

More information

Overview of PL/SQL. About PL/SQL. PL/SQL Environment. Benefits of PL/SQL. Integration

Overview of PL/SQL. About PL/SQL. PL/SQL Environment. Benefits of PL/SQL. Integration About PL/ Overview of PL/ PL/ is an extension to with design features of programming languages. Data manipulation and query statements of are included within procedural units of code. PL/ Environment Benefits

More information

Relational Database Language

Relational Database Language DATA BASE MANAGEMENT SYSTEMS Unit IV Relational Database Language: Data definition in SQL, Queries in SQL, Insert, Delete and Update Statements in SQL, Views in SQL, Specifying General Constraints as Assertions,

More information

Study Guide for: Oracle Database SQL Certified Expert Exam Guide (Exam 1Z0-047)

Study Guide for: Oracle Database SQL Certified Expert Exam Guide (Exam 1Z0-047) Study Guide for: Oracle Database SQL Certified Expert Exam Guide (Exam 1Z0-047) Study Material for: Student 08.10.2010 15:49:30 Examine the following data listing for table WORKERS: WORKER_ID LAST_NAME

More information

Overview. Data Integrity. Three basic types of data integrity. Integrity implementation and enforcement. Database constraints Transaction Trigger

Overview. Data Integrity. Three basic types of data integrity. Integrity implementation and enforcement. Database constraints Transaction Trigger Data Integrity IT 4153 Advanced Database J.G. Zheng Spring 2012 Overview Three basic types of data integrity Integrity implementation and enforcement Database constraints Transaction Trigger 2 1 Data Integrity

More information

Answer: The tables being joined each have two columns with the same name and compatible data types, and you want to join on both of the columns.

Answer: The tables being joined each have two columns with the same name and compatible data types, and you want to join on both of the columns. Page 1 of 22 Item: 1 (Ref:Cert-1Z0-071.6.2.4) In which situation would you use a natural join? The tables being joined do not have primary and foreign keys defined. The tables being joined have matching

More information

Question Bank PL/SQL Fundamentals-I

Question Bank PL/SQL Fundamentals-I Question Bank PL/SQL Fundamentals-I UNIT-I Fundamentals of PL SQL Introduction to SQL Developer, Introduction to PL/SQL, PL/SQL Overview, Benefits of PL/SQL, Subprograms, Overview of the Types of PL/SQL

More information

Using DDL Statements to Create and Manage Tables. Copyright 2004, Oracle. All rights reserved.

Using DDL Statements to Create and Manage Tables. Copyright 2004, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Categorize the main database

More information

ORACLE VIEWS ORACLE VIEWS. Techgoeasy.com

ORACLE VIEWS ORACLE VIEWS. Techgoeasy.com ORACLE VIEWS ORACLE VIEWS Techgoeasy.com 1 Oracle VIEWS WHAT IS ORACLE VIEWS? -A view is a representation of data from one or more tables or views. -A view is a named and validated SQL query which is stored

More information

Introduction to Oracle9i: SQL Basics

Introduction to Oracle9i: SQL Basics Introduction to Oracle9i: SQL Basics Student Guide Volume 2 40057GC11 Production 1.1 November 2001 D34043 Authors Nancy Greenberg Priya Nathan Technical Contributors and Reviewers Josephine Turner Martin

More information

Question: Which statement would you use to invoke a stored procedure in isql*plus?

Question: Which statement would you use to invoke a stored procedure in isql*plus? What are the two types of subprograms? procedure and function Which statement would you use to invoke a stored procedure in isql*plus? EXECUTE Which SQL statement allows a privileged user to assign privileges

More information

Test: Mid Term Exam Semester 2 Part 1 Review your answers, feedback, and question scores below. An asterisk (*) indica tes a correct answer.

Test: Mid Term Exam Semester 2 Part 1 Review your answers, feedback, and question scores below. An asterisk (*) indica tes a correct answer. Test: Mid Term Exam Semester 2 Part 1 Review your answers, feedback, and question scores below. An asterisk (*) indica tes a correct answer. Section 1 (Answer all questions in this section) 1. Which comparison

More information

SQL IN PL/SQL. In this chapter, you will learn about: Making Use of DML in PL/SQL Page 68 Making Use of Savepoint Page 77

SQL IN PL/SQL. In this chapter, you will learn about: Making Use of DML in PL/SQL Page 68 Making Use of Savepoint Page 77 CHAPTER 4 SQL IN PL/SQL CHAPTER OBJECTIVES In this chapter, you will learn about: Making Use of DML in PL/SQL Page 68 Making Use of Savepoint Page 77 This chapter is a collection of some fundamental elements

More information

M.C.A. (CBCS) Sem.-III Examination November-2013 CCA-3004 : Database Concepts and Tools. Faculty Code: 003 Subject Code:

M.C.A. (CBCS) Sem.-III Examination November-2013 CCA-3004 : Database Concepts and Tools. Faculty Code: 003 Subject Code: 003-007304 M.C.A. (CBCS) Sem.-III Examination November-2013 CCA-3004 : Database Concepts and Tools Faculty Code: 003 Subject Code: 007304 Time: 21/2 Hours] [Total Marks: 70 I. Answer the following multiple

More information

Oracle MOOC: SQL Fundamentals

Oracle MOOC: SQL Fundamentals Week 4 Homework for Lesson 4 Homework is your chance to put what you've learned in this lesson into practice. This homework is not "graded" and you are encouraged to write additional code beyond what is

More information

ADVANTAGES. Via PL/SQL, all sorts of calculations can be done quickly and efficiently without use of Oracle engine.

ADVANTAGES. Via PL/SQL, all sorts of calculations can be done quickly and efficiently without use of Oracle engine. 1 PL/SQL INTRODUCTION SQL does not have procedural capabilities. SQL does not provide the programming techniques of condition checking, looping and branching that is required for data before permanent

More information

Using DDL Statements to Create and Manage Tables. Copyright 2004, Oracle. All rights reserved.

Using DDL Statements to Create and Manage Tables. Copyright 2004, Oracle. All rights reserved. Using DDL Statements to Create and Manage Tables Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Categorize the main database

More information

T-SQL Training: T-SQL for SQL Server for Developers

T-SQL Training: T-SQL for SQL Server for Developers Duration: 3 days T-SQL Training Overview T-SQL for SQL Server for Developers training teaches developers all the Transact-SQL skills they need to develop queries and views, and manipulate data in a SQL

More information

PL/SQL Block structure

PL/SQL Block structure PL/SQL Introduction Disadvantage of SQL: 1. SQL does t have any procedural capabilities. SQL does t provide the programming technique of conditional checking, looping and branching that is vital for data

More information

WHAT IS SQL. Database query language, which can also: Define structure of data Modify data Specify security constraints

WHAT IS SQL. Database query language, which can also: Define structure of data Modify data Specify security constraints SQL KEREM GURBEY WHAT IS SQL Database query language, which can also: Define structure of data Modify data Specify security constraints DATA DEFINITION Data-definition language (DDL) provides commands

More information

Database Programming with PL/SQL

Database Programming with PL/SQL Database Programming with PL/SQL 3-3 Objectives This lesson covers the following objectives: Construct and execute PL/SQL statements that manipulate data with DML statements Describe when to use implicit

More information

Oracle EXAM - 1Z Oracle Database SQL Expert. Buy Full Product.

Oracle EXAM - 1Z Oracle Database SQL Expert. Buy Full Product. Oracle EXAM - 1Z0-047 Oracle Database SQL Expert Buy Full Product http://www.examskey.com/1z0-047.html Examskey Oracle 1Z0-047 exam demo product is here for you to test the quality of the product. This

More information

Item: 1 (Ref:Cert-1Z )

Item: 1 (Ref:Cert-1Z ) Page 1 of 13 Item: 1 (Ref:Cert-1Z0-071.10.2.1) Evaluate this CREATE TABLE statement: CREATE TABLE customer ( customer_id NUMBER, company_id VARCHAR2(30), contact_name VARCHAR2(30), contact_title VARCHAR2(20),

More information

Oracle SQL & PL SQL Course

Oracle SQL & PL SQL Course Oracle SQL & PL SQL Course Complete Practical & Real-time Training Job Support Complete Practical Real-Time Scenarios Resume Preparation Lab Access Training Highlights Placement Support Support Certification

More information

Principles of Data Management

Principles of Data Management Principles of Data Management Alvin Lin August 2018 - December 2018 Structured Query Language Structured Query Language (SQL) was created at IBM in the 80s: SQL-86 (first standard) SQL-89 SQL-92 (what

More information

Intermediate SQL: Aggregated Data, Joins and Set Operators

Intermediate SQL: Aggregated Data, Joins and Set Operators Intermediate SQL: Aggregated Data, Joins and Set Operators Aggregated Data and Sorting Objectives After completing this lesson, you should be able to do the following: Identify the available group functions

More information

Oracle 12C DBA Online Training. Course Modules of Oracle 12C DBA Online Training: 1 Oracle Database 12c: Introduction to SQL:

Oracle 12C DBA Online Training. Course Modules of Oracle 12C DBA Online Training: 1 Oracle Database 12c: Introduction to SQL: Course Modules of Oracle 12C DBA Online Training: 1 Oracle Database 12c: Introduction to SQL: A. Introduction Course Objectives, Course Agenda and Appendixes Used in this Course Overview of Oracle Database

More information

Oracle Database 10g: SQL Fundamentals I. Oracle Internal & Oracle Academy Use Only. Student Guide Volume 2. D17108GC30 Edition 3.0 January 2009 D57871

Oracle Database 10g: SQL Fundamentals I. Oracle Internal & Oracle Academy Use Only. Student Guide Volume 2. D17108GC30 Edition 3.0 January 2009 D57871 D17108GC30 Edition 3.0 January 2009 D57871 Oracle Database 10g: SQL Fundamentals I Student Guide Volume 2 Authors Salome Clement Chaitanya Koratamaddi Nancy Greenberg Technical Contributors and Reviewers

More information

Using the Set Operators. Copyright 2006, Oracle. All rights reserved.

Using the Set Operators. Copyright 2006, Oracle. All rights reserved. Using the Set Operators Objectives After completing this lesson, you should be able to do the following: Describe set operators Use a set operator to combine multiple queries into a single query Control

More information

Database Programming with SQL

Database Programming with SQL Database Programming with SQL 2-1 Objectives This lesson covers the following objectives: Apply the concatenation operator to link columns to other columns, arithmetic expressions, or constant values to

More information

Oracle Database: SQL Fundamentals I. Oracle Internal & Oracle Academy Use Only. Volume II Student Guide. D64258GC10 Edition 1.0 January 2010 D65028

Oracle Database: SQL Fundamentals I. Oracle Internal & Oracle Academy Use Only. Volume II Student Guide. D64258GC10 Edition 1.0 January 2010 D65028 D64258GC10 Edition 1.0 January 2010 D65028 Oracle Database: SQL Fundamentals I Volume II Student Guide Authors Salome Clement Brian Pottle Puja Singh Technical Contributors and Reviewers Anjulaponni Azhagulekshmi

More information

SELF TEST. List the Capabilities of SQL SELECT Statements

SELF TEST. List the Capabilities of SQL SELECT Statements 98 SELF TEST The following questions will help you measure your understanding of the material presented in this chapter. Read all the choices carefully because there might be more than one correct answer.

More information

Business Analytics. SQL PL SQL [Oracle 10 g] P r i n c e S e t h i w w w. x l m a c r o. w e b s. c o m

Business Analytics. SQL PL SQL [Oracle 10 g] P r i n c e S e t h i w w w. x l m a c r o. w e b s. c o m Business Analytics Let s Learn SQL-PL SQL (Oracle 10g) SQL PL SQL [Oracle 10 g] RDBMS, DDL, DML, DCL, Clause, Join, Function, Queries, Views, Constraints, Blocks, Cursors, Exception Handling, Trapping,

More information

Lab # 2. Data Definition Language (DDL) Eng. Alaa O Shama

Lab # 2. Data Definition Language (DDL) Eng. Alaa O Shama The Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Database Lab Lab # 2 Data Definition Language (DDL) Eng. Alaa O Shama October, 2015 Objective To be familiar

More information

Slides by: Ms. Shree Jaswal

Slides by: Ms. Shree Jaswal Slides by: Ms. Shree Jaswal A trigger is a statement that is executed automatically by the system as a side effect of a modification to the database. To design a trigger mechanism, we must: Specify the

More information

Chapter 4. Basic SQL. SQL Data Definition and Data Types. Basic SQL. SQL language SQL. Terminology: CREATE statement

Chapter 4. Basic SQL. SQL Data Definition and Data Types. Basic SQL. SQL language SQL. Terminology: CREATE statement Chapter 4 Basic SQL Basic SQL SQL language Considered one of the major reasons for the commercial success of relational databases SQL Structured Query Language Statements for data definitions, queries,

More information

SYSTEM CODE COURSE NAME DESCRIPTION SEM

SYSTEM CODE COURSE NAME DESCRIPTION SEM Course: CS691- Database Management System Lab PROGRAMME: COMPUTER SCIENCE & ENGINEERING DEGREE:B. TECH COURSE: Database Management System Lab SEMESTER: VI CREDITS: 2 COURSECODE: CS691 COURSE TYPE: Practical

More information

chapter 2 G ETTING I NFORMATION FROM A TABLE

chapter 2 G ETTING I NFORMATION FROM A TABLE chapter 2 Chapter G ETTING I NFORMATION FROM A TABLE This chapter explains the basic technique for getting the information you want from a table when you do not want to make any changes to the data and

More information