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

Size: px
Start display at page:

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

Transcription

1 Study Guide for: Oracle Database SQL Certified Expert Exam Guide (Exam 1Z0-047) Study Material for: Student :49:30 Examine the following data listing for table WORKERS: WORKER_ID LAST_NAME SUPERVISOR_ID Madeoff 2 Gotaway 1 3 Didit 1 4 Tookit 2 5 Skipped 2 6 Gone 2 7 Bundy 3 You are tasked to produce a report listing of this table's data in a hierarchy, excluding worker Didit and all those who report to worker Didit. Which of the following queries will accomplish this task? B: SELECT WORKER_ID, LPAD(' ',LEVEL) LAST_NAME NAME FROM WORKERS START WITH WORKER_ID = 1 CONNECT BY PRIOR WORKER_ID = SUPERVISOR_ID AND LAST_NAME <> 'Didit'; B is correct. Using the AND operator to extend the logic of CONNECT BY and exclude worker Didit is correct. In addition, PRIOR should be used on the side of the CONNECT BY comparison with the row containing the higher-level value in the hierarchy. A, C, and D are incorrect. You cannot simply use the WHERE clause to exclude worker Didit, as this will merely exclude that individual worker, but not worker Bundy, who reports to worker Didit. Furthermore, PRIOR should be used on the side of the CONNECT BY comparison with the higher-level value in the hierarchy. See Chapter 16, Hierarchical Retrieval: Create and Format Hierarchical Data, and Exclude Branches from the Tree Structure OBJECTIVE: Create a tree-structured report; Format hierarchical data; exclude branches from the tree structure. A scalar subquery can be used (choose two): A: In a WHERE clause of an UPDATE statement C: In a VALUES list of an INSERT statement LearnKey, Inc. Copyright 2006, All Rights Reserved. Page 1

2 A and C are correct. Scalar subqueries are allowed in an UPDATE statement's WHERE clause, and also in an INSERT statement's VALUES list. B and D are incorrect. Scalar subqueries are not allowed in a number of situations, including a CHECK constraint, the GROUP BY and HAVING clauses of a SELECT statement, the WHEN condition of CASE, and more. See Chapter 9, Retrieving Data Using Subqueries: 9.06 Use Scalar Subqueries in SQL OBJECTIVE: Use scalar subqueries in SQL. Examine the following SQL code: CREATE OR REPLACE DIRECTORY ORDER_RECS AS 'G:\ext\txt\order_recs'; If the directory structure specified in the statement does not already exist, what will result from the attempt to execute the statement? C: The statement will succeed but will not create the directory; furthermore, if the ORDER_RECS object is used to create an external table, the CREATE TABLE statement will fail. C is correct. The DIRECTORY object can be created regardless of whether the file system subdirectory exists. SQL will not test for the presence of the file system's subdirectory until you attempt to use the DIRECTORY object in a CREATE TABLE statement to build an EXTERNAL TABLE. A, B, and D are incorrect. The statement will not fail with an error. SQL will not attempt to create the file system's subdirectory for you. You must create it, and you must do so before you use the DIRECTORY object to create an EXTERNAL TABLE. See Chapter 11, Managing Schema Objects: 11:07 Create and Use External Tables OBJECTIVE: Create and use external tables. Consider a series of two or more SELECT statements that are combined into one using set operators. Which of the following is true of the resulting SELECT statement? C: It can include a hierarchical query in at least one of the SELECT statements. C is correct. You may combine one or more hierarchical with one or more non-hierarchical queries with set operators. A, B, and D are incorrect. Set operators are allowed in subqueries. GROUP BY clauses are also accepted. Each of the combined SELECT statements must have the same number of LearnKey, Inc. Copyright 2006, All Rights Reserved. Page 2

3 expressions in the select list. See Chapter 12, Using the Set Operators: 12:02 Use a Set Operator to Combine Multiple Queries into a Single Query OBJECTIVE: Use a set operator to combine multiple queries into a single query. Examine the following SQL code: CREATE TABLE SUPPLIERS (SUPPLIER_ID NUMBER(9) CONSTRAINT PK_SUPPLIERS PRIMARY KEY, SUPPLIER_NAME VARCHAR2(20)); CREATE TABLE ORDERS (ORDER_ID NUMBER(9) PRIMARY KEY, SUPPLIER_ID NUMBER(9)); ALTER TABLE ORDERS ADD CONSTRAINT ORDERS_FK_1 FOREIGN KEY (SUPPLIER_ID) REFERENCES SUPPLIERS (SUPPLIER_ID); Which of the following statements will disable the primary key constraint in the SUPPLIERS table? C: ALTER TABLE SUPPLIERS DISABLE PRIMARY KEY CASCADE; C is correct. The CASCADE keyword is required because of the ORDERS_FK_1 constraint in the ORDERS table that references the SUPPLIERS table. A, B, and D are incorrect. The DISABLE option by itself will not work given that there's a referential constraint involved. The CASCADE CONSTRAINTS keywords are not relevant; only CASCADE is used with DISABLE. You cannot directly disable the constraint; instead, you alter the table and disable the constraint accordingly. See Chapter 11, Managing Schema Objects: 11:03 Add Constraints OBJECTIVE: Add constraints. Click the Exhibit button. Examine the Exhibit. Next, match the SELECT statement with the type of join. 1. Inner join 2. Outer join 3. Non-equijoin 4. Cross-join a. SELECT STORE_NAME, LAST_NAME FROM STORES S JOIN EMPLOYEES E ON S.STORE_ID > E.STORE_ID; b. SELECT STORE_NAME, LAST_NAME FROM STORES NATURAL JOIN EMPLOYEES; LearnKey, Inc. Copyright 2006, All Rights Reserved. Page 3

4 c. SELECT STORE_NAME, LAST_NAME FROM STORES, EMPLOYEES; d. SELECT STORE_NAME, LAST_NAME FROM STORES S RIGHT JOIN EMPLOYEES E ON S.STORE_ID = E.STORE_ID; A: 1-b, 2-d, 3-a, 4-c A is correct. The RIGHT JOIN keywords indicate an OUTER join. The NATURAL join is, by default, also an INNER join. A join that uses the greater-than or less-than sign is a non-equijoin. Finally, a join that uses no criteria at all is a cross join, or Cartesian product. B, C, and D are incorrect. The RIGHT JOIN is not an inner join, but an outer join. The simple JOIN is an inner join, not an outer join. The lack of any join criteria at all is a Cartesian product, and the greater-than or less-than operators indicate the non-equijoin. See Chapter 8, Displaying Data from Multiple Tables: 8.01 Write SELECT Statements to Access Data from More Than One Table Using Equijoins and Non-Equijoins / View Data That Generally Does Not Meet a Join Condition by Using Outer Joins, and 8.03 Generate a Cartesian Product of All Rows from Two or More Tables OBJECTIVE: Write SELECT statements to access data from more than one table using equijoins and nonequijoins; view data that generally does not meet a join condition by using outer joins; generate a Cartesian product of all rows from two or more tables. Click the Exhibit button. Examine the Exhibit. Now examine the following code: CREATE VIEW VW_ADDRESSES (LINE_1, LINE_2, LINE_3) AS SELECT STREET, SUITE, CITY ', ' STATE ' ' ZIP_BASE '-' ZIP_PLUS FROM ADDRESSES; Which of the following is true for this SQL code? D: None of the above. D is correct. The statement will succeed and create a new view with three columns named LINE_1, LINE_2, and LINE_3. A, B, and C are incorrect. The statement will not fail, it is syntactically correct. No data will be copied-view objects do not copy data. See Chapter 10, Creating Other Schema Objects: 10:01 Create and Use Simple and Complex Views OBJECTIVE: Create simple and complex views; retrieve data from views. LearnKey, Inc. Copyright 2006, All Rights Reserved. Page 4

5 Click the Exhibit button. Examine the Exhibit. Now examine the following SQL code (line numbers added): 01 CREATE SEQUENCE C_ID; MERGE INTO CONTACTS C1 04 USING EMPLOYEES E1 05 ON (C1.FIRST_NAME C1.LAST_NAME = E1.FIRST_NAME E1.LAST_NAME) 06 WHEN MATCHED THEN 07 UPDATE 08 SET C1.ADDRESS_ID = E1.ADDRESS_ID 09 WHEN NOT MATCHED THEN 10 INSERT 11 (C1.CONTACT_ID, C1.FIRST_NAME, C1.LAST_NAME, C1.ADDRESS_ID) 12 VALUES 13 (C_ID.NEXTVAL, E1.FIRST_NAME, E1.LAST_NAME, E1.ADDRESS_ID) 14 ; Which of the following statements is true? D: The sequence object reference in line 13 is acceptable and will produce a desirable result. D is correct. The use of the sequence generator is correct here. A, B, and C are incorrect. The MERGE statement is not required to include a DELETE clause, but if included, it belongs within the WHEN MATCHED clause, after UPDATE, and not the WHEN NOT MATCHED clause. The ON clause in this example is acceptable. See Chapter 15, Manipulating Large Data Sets: Merge Rows in a Table OBJECTIVE: Merge rows in a table. The data dictionary view USER_CONSTRAINTS has a column R_CONSTRAINT_NAME. What can be said of this column? D: None of the above. D is correct. The R_CONSTRAINT_NAME column is not any of the displayed options. It contains the name of a referred constraint. For a foreign key constraint, the R_CONSTRAINT_NAME column will show the name of a primary key constraint that the foreign key references. A, B, and C are incorrect. The R_CONSTRAINT_NAME column does not store the name of the constraint type; that is stored in the column CONSTRAINT_TYPE. There is no column that tracks the previous name of a renamed constraint. And while it's true that the R_CONSTRAINT_NAME column is only used for foreign key constraints, it is not the constraint name, which is stored in the column CONSTRAINT_NAME. LearnKey, Inc. Copyright 2006, All Rights Reserved. Page 5

6 See Chapter 14, Managing Objects with Data Dictionary Views: Query Various Data Dictionary Views OBJECTIVE: Query various data dictionary views. Examine the following SQL code: CREATE TABLE EMPLOYEES ( EMPLOYEE_ID NUMBER(9) PRIMARY KEY, NOTES CLOB, RESUME CLOB, FIRST_NAME VARCHAR2(25), LAST_NAME VARCHAR2(35) CONSTRAINT LN_REQUIRED NOT NULL ); Which of the following statements correctly describe the preceding statement? D: It will successfully create the table. D is correct. The syntax is correct, and it will successfully create the table. A, B, and C are incorrect. You can specify names for NOT NULL constraints. What you cannot do is create a NOT NULL constraint with the out-of-line syntax, and that is not what is being used here-this is in-line syntax. You may create more than one CLOB datatype. You may place them in any location within the table's column list. See Chapter 2, Using DDL Statements to Create and Manage Tables: 2.04 List the Data Types That Are Available for Columns OBJECTIVE: Use DDL statements to create and manage tables. In the data dictionary view FLASHBACK_TRANSACTION_QUERY, the column UNDO_SQL contains SQL code to reverse the effects of (choose the best answer): B: A single SQL statement B is correct. The UNDO_SQL column shows information required to undo a single SQL statement. A, C, and D are incorrect. A SQL transaction is defined as all of the statements from one commit event to another. While that might encompass a single SQL statement, it may also encompass multiple SQL statements, and the UNDO_SQL column only shows the code to reverse the effects of a single SQL statement. The VERSIONS_BETWEEN and AS OF statements are not relevant to the UNDO_SQL column of the FLASHBACK_TRANSACTION_QUERY view. LearnKey, Inc. Copyright 2006, All Rights Reserved. Page 6

7 See Chapter 15, Manipulating Large Data Sets: Track the Changes to Data over a Period of Time OBJECTIVE: Track the changes to data over a period of time. Examine the following SQL code: CREATE TABLE COURSES (COURSE_ID NUMBER(3), DAYS VARCHAR2(30)); ALTER TABLE COURSES ADD CONSTRAINT CK_DAYS CHECK (DAYS <= 90); INSERT INTO COURSES VALUES (1,100); Which of the following statements is true of the code? B: The INSERT statement will fail due to a constraint violation. B is correct. The INSERT statement will fail due to the violation of the constraint, since you cannot enter a value greater than 90. A, C, and D are incorrect. Even though the constraint uses a mathematical equation on a column that accepts text data, the attempt to create the constraint will succeed. See Chapter 11, Managing Schema Objects: 11:03 Add Constraints OBJECTIVE: Add constraints. Which of the following clauses is used to sort rows in a hierarchical query at the same level without disrupting the tree structure? C: ORDER BY SIBLINGS BY C is correct. ORDER SIBLINGS BY is used to sort rows within a given level, while preserving the hierarchical tree structure of the output. A, B, and D are incorrect. ORDER BY can work syntactically, but the effect is often undesirable, as the tree structure will be disrupted. ORDER BY LEVEL can also work syntactically but will produce a result that sorts rows according to level, which may be useful but will not preserve the tree structure. ORDER BY ROOT includes the word ROOT, which is not a particular keyword and would assume the presence of a column ROOT; it does not answer this question. See Chapter 16, Hierarchical Retrieval: Create and Format Hierarchical Data OBJECTIVE: Create a tree-structured report; format hierarchical data. LearnKey, Inc. Copyright 2006, All Rights Reserved. Page 7

8 Click the Exhibit button. Examine the Exhibit. Which of the following SELECT statements will fail with one or more syntax errors? D: SELECT AVG(SUM(DISCOUNT)) FROM SUPPLIERS; D is correct. The AVG of the SUM would only work if the SELECT statement had a valid GROUP BY clause. A, B, and C are incorrect. Answer A is fine, because you may nest an aggregate function within another aggregate function provided that a GROUP BY clause is present in the SELECT statement, and it is in this example. Answer B is valid, but it would not be valid if the COUNT function were omitted. In other words, if the SELECT statement specified ORDER_DATE by itself, then a syntax error would result, indicating that ORDER_DATE is "not a GROUP BY function". If the same use of TO_CHAR were applied to ORDER_DATE as it is used in the GROUP BY clause, then it would work. But in the code shown in Answer B, the aggregate function COUNT is applied to the ORDER_DATE column, which is accepted as a valid SELECT statement. Answer C is valid. The CASE function is a single-row function that processes text data and returns numeric data that feeds into the outer aggregate SUM function. See Chapter 6, Use Single-Row Functions to Customize Output: 6.02 Use Character, Number, and Date Functions in SELECT Statements; also see Chapter 7, Reporting Aggregated Data Using the Group Functions: 7.03 Group Data by Using the GROUP BY Clause OBJECTIVE: Use character, number, and date functions in SELECT statements; also group data by using the GROUP BY clause. Examine the following SQL code: CREATE SEQUENCE CTR MAXVALUE 30 CYCLE; What is the setting for MINVALUE? C: 1 C is correct. The default value for MINVALUE is 1. The sequence will increment to 30, then start over again at 1. A, B, and D are incorrect. The statement will succeed and a sequence will be created. The MINVALUE will not default to 0 or 30, the default is 1. See Chapter 10, Creating Other Schema Objects: 10:02 Create, Maintain, and Use Sequences LearnKey, Inc. Copyright 2006, All Rights Reserved. Page 8

9 OBJECTIVE: Create, maintain, and use sequences. Click the Exhibit button. Examine the Exhibit. You are tasked with producing a report that lists data from the PRODUCTS and SUPPLIERS tables so that the data is grouped by SUPPLIERS.SUPPLIER_NAME and PRODUCTS.PERISHABLE. Furthermore, your output must include the count of each perishable and non-perishable item, as well as a total of all products for that particular supplier. Your report will not include a grand total, however. The output should look something like this: SUPPLIER_NAME P COUNT(*) Acme N 2 Acme Y 3 Acme 5 Joes N 2 Joes 2 Atrexa N 3 Atrexa Y 1 Atrexa 4 Which of the following queries will satisfy this task? A: SELECT S.SUPPLIER_NAME, P.PERISHABLE, COUNT(*) FROM PRODUCTS P JOIN SUPPLIERS S ON P.SUPPLIER_ID = S.SUPPLIER_ID GROUP BY S.SUPPLIER_NAME, ROLLUP(P.PERISHABLE); A is correct. The use of the ROLLUP operator in the second GROUP BY group will produce the correct set of subtotals, without producing a grand total line at the end. B, C, and D are incorrect. The use of ROLLUP on the SUPPLIER_NAME column will product a total for all suppliers, and this violates the task. But the use of ROLLUP on only the PERISHABLE column does accomplish the task. See Chapter 13, Generating Reports by Grouping Related Data: Use the ROLLUP Operation to Produce Subtotal Values OBJECTIVE: Use the ROLLUP operation to produce subtotal values. In a multitable INSERT statement: B: A table alias defined in a multitable INSERT statement subquery is not recognized throughout the rest of the INSERT statement. B is correct. If you create a table alias within the subquery of a multitable INSERT, its scope is that subquery and no further. A, C, and D are incorrect. The keyword ALL is used in both conditional and unconditional LearnKey, Inc. Copyright 2006, All Rights Reserved. Page 9

10 multitable INSERT. Each INSERT statement is not required to specify an identical number of expressions. In a multitable INSERT, the SELECT statement at the end will specify the population from which each INSERT may draw values, but each INSERT is free to specify its own unique set of expressions. Any error in the INSERT will cause the statement to roll back all changes made to the database as a result of that particular execution of the statement. See Chapter 15, Manipulating Large Data Sets: Use the Following Types of Multitable INSERTs: Unconditional, Conditional, and Pivot OBJECTIVE: Use the following types of multitable INSERTs: unconditional, conditional, and pivot. Which of the following keywords will never appear in any valid self-join? B: SELF B is correct. The word SELF is not a valid keyword in SELECT statements. A, C, and D are incorrect. RIGHT, INNER, and JOIN are all valid keywords that may be used with a valid self-join query. See Chapter 8, Displaying Data from Multiple Tables: 8.02 Join a Table to Itself by Using a Self-Join OBJECTIVE: Join a table to itself by using a self-join. Examine the following output: Answer :00: The output is the result of which of the following statements? B: SELECT NUMTODSINTERVAL(120, 'MINUTE') AS "Answer" FROM DUAL; B is correct. The function NUMTODSINTERVAL takes two parameters. The first specifies a value, and the second specifies the interval unit that defines the first parameter. In this particular example, therefore, the value of 120 is specified as 'MINUTES', which must be enclosed in single quotes; the list of parameters must be enclosed in parentheses. The result displayed is a literal value of the datatype INTERVAL DAY TO SECOND. A, C, and D are incorrect. Quotation marks are required with the second parameter of the NUMTODSINTERVAL function, and its corresponding function NUMTOYMINTERVAL. This should not be confused with the syntax for displaying literal datetime intervals-for example, SELECT INTERVAL '120' MINUTE FROM DUAL will return a literal representation of the LearnKey, Inc. Copyright 2006, All Rights Reserved. Page 10

11 same thing; note how quotation marks surround the value, and not the keyword MINUTE in this context. The same is true for the other datetime units of YEAR, MONTH, DAY, and SECOND. The NUMTODSINTERVAL function differs in that its quoted strings are input parameters to the function, and its output represents values of the INTERVAL DAY TO SECOND datatype, suitable for situations where the datatype is strictly required. See Chapter 6, Use Single-Row Functions to Customize Output: 6.02 Use Character, Number, and Date Functions in SELECT Statements OBJECTIVE: Use character, number, and date functions in SELECT statements. Which of the following statements about datatypes is true? C: NUMBER will round off numeric data according to its specified scale. C is correct. While the NUMBER datatype does not require a specified value for scale, any specified value for scale will determine the detail to which numbers will be rounded. A, B, and D are incorrect. The VARCHAR2 datatype does not pad text with blanks to ensure its length is equal to the specified precision-it's the CHAR datatype that does. The VARCHAR2 datatype varies in stored length, up to the specified precision. It's not the DATE datatype that stores fractional seconds, but the TIMESTAMP datatype. Finally, TIMESTAMP WITH LOCAL TIME ZONE does store fractional seconds. See Chapter 2, Using DDL Statements to Create and Manage Tables: 2.04 List the Data Types That Are Available for Columns, and also see Chapter 6, Use Single-Row Functions to Customize Output: 6.04 Manage Data in Different Time Zones-Use Various Datetime Functions OBJECTIVE: Use DDL statements to create and manage tables; manage data in different time zones. Consider the following SQL code: CREATE TABLE PRODUCTS (PRODUCT_ID NUMBER(9) PRIMARY KEY, PRODUCT_TITLE VARCHAR2(20), PERISHABLE CHAR(1), CONSTRAINT CHECK_PERISHABLE CHECK (PERISHABLE IN ('Y','N'))); SET CONSTRAINT CHECK_PERISHABLE DEFERRED; What can be said of these statements? D: None of the above. LearnKey, Inc. Copyright 2006, All Rights Reserved. Page 11

12 D is correct. The answer is not included in the options that are shown. The SET CONSTRAINT statement will fail because the CHECK_PERISHABLE constraint needs to be set to DEFERRABLE. The constraint itself must be set to DEFERRABLE; if not, the SET CONSTRAINT statement cannot defer it. A, B, and C are incorrect. The SET CONSTRAINT statement does not have a syntax error. But it will fail at execution because of the constraint, and not the statement's syntax. See Chapter 11, Managing Schema Objects: 11:03 Add Constraints OBJECTIVE: Add constraints. Click the Exhibit button. Examine the Exhibit and the data listing for table PRODUCTS that follows: PRODUCT_ID PRODUCT_TITLE ENTERED TV Stand 01-SEP-09 2 Floor lamp 02-SEP-09 3 Wood shelf 03-SEP-09 4 Cupboard 04-SEP-09 Next, examine the following code: SELECT CASE INSTR(PRODUCT_TITLE,'Wood') WHEN 0 THEN 'No furniture polish required' ELSE 'Recommend furniture polish' END FROM PRODUCTS WHERE PRODUCT_ID = 3; What will the SELECT statement return as output? D: 'Recommend furniture polish'. D is correct. The CASE function is correct and will produce the output specified by the ELSE clause of the CASE function. A, B, and C are incorrect. There is nothing incorrect about the CASE function syntax. CASE can handle numeric or text data. See Chapter 6, Use Single-Row Functions to Customize Output: 6.02 Use Character, Number, and Date Functions in SELECT Statements OBJECTIVE: Use character, number, and date functions in SELECT statements. A user CLEO executes the following SQL statement: CREATE TABLE TAB_PRODUCTS (PRODUCT_ID CHAR(10), PRODUCT_TITLE CHAR(20), CATALOG_NO CHAR(10)) LearnKey, Inc. Copyright 2006, All Rights Reserved. Page 12

13 ORGANIZATION EXTERNAL (TYPE ORACLE_LOADER DEFAULT DIRECTORY IMPORT_PRODUCTS ACCESS PARAMETERS (RECORDS DELIMITED BY NEWLINE SKIP 3 FIELDS (PRODUCT_ID CHAR(10), PRODUCT_TITLE CHAR(20), CATALOG_NO CHAR(10)) ) LOCATION ('IMPORTED_PRODUCTS.ASC') ); Assuming the statement executes successfully and all associated files and objects exist as required, which of the following additional actions must user CLEO take in order to ensure that user TONY will have access to the table TAB_PRODUCTS? (Choose two.) B: GRANT SELECT ON TAB_PRODUCTS TO TONY; C: GRANT READ, WRITE ON DIRECTORY IMPORT_PRODUCTS TO TONY; B and C are correct. A DIRECTORY object is an integral part of an EXTERNAL TABLE. In order for a user to gain access to an EXTERNAL TABLE, the user must also be granted READ and WRITE access to the DIRECTORY object on which the EXTERNAL TABLE is based. A and D are incorrect. You do not grant direct access to the text file itself in any way, this is encompassed within the definition of the EXTERNAL TABLE. The EXTERNAL keyword is not relevant to any GRANT statement. See Chapter 11, Managing Schema Objects: 11:07 Create and Use External Tables OBJECTIVE: Create and use external tables. Click the Exhibit button. Examine the Exhibit. Now look at this code listing: SELECT PRODUCT_TITLE FROM PRODUCTS P WHERE NOT EXISTS (SELECT SUPPLIER_ID FROM SUPPLIERS S WHERE P.SUPPLIER_ID = S.SUPPLIER_ID); If there are no rows in the SUPPLIERS table, which of the following statements is true? C: The query will return all the rows in the PRODUCTS table, regardless of what may be in the SUPPLIER_ID column. C is correct. If the SUPPLIERS table has no rows, then all of the rows in PRODUCTS will be returned. A, B, and D are incorrect. It might be tempting to consider that the NULL rows will somehow reverse the results of the NOT EXISTS, particularly in the event of the NULL values for LearnKey, Inc. Copyright 2006, All Rights Reserved. Page 13

14 SUPPLIER_ID. But SQL will not assume that a lack of information-meaning no rows in SUPPLIERS-compared to a lack of information-meaning no values in PRODUCTS.SUPPLIER_ID-will somehow combine to produce a positive result. The bottom line: none of the PRODUCTS rows can possibly have a match in an empty table, so all of the PRODUCTS rows do not exist in the SUPPLIERS table. See Chapter 9, Retrieving Data Using Subqueries: 9.09 Use the EXISTS and NOT EXISTS Operators OBJECTIVE: Use the EXISTS and NOT EXISTS operators. Click the Exhibit button. Examine the Exhibit. Now examine the following SQL code: SELECT GROUPING(P.PERISHABLE),S.SUPPLIER_NAME, P.PERISHABLE, COUNT(*) FROM PRODUCTS P JOIN SUPPLIERS S ON P.SUPPLIER_ID = S.SUPPLIER_ID GROUP BY ROLLUP(S.SUPPLIER_NAME, P.PERISHABLE); What will be the effect of the GROUPING function in line 1? C: To return a 1 for each subtotal of PERISHABLE and for each subtotal of SUPPLIER_NAME C is correct. The GROUPING function identifies superaggregate rows by returning a value of 1 in each of those rows. In all other rows, the GROUPING function returns a zero. Superaggregate rows, in this example, will include all subtotals of PERISHABLE and higher, which will also include SUPPLIER_NAME. A, B, and D are incorrect. GROUPING does not group rows but rather returns a value of 0 or 1 to identify aggregate and superaggregate rows. See Chapter 13, Generating Reports by Grouping Related Data: Use the GROUPING Function to Identify the Row Values Created by ROLLUP or CUBE OBJECTIVE: Use the GROUPING function to identify the row values created by ROLLUP or CUBE. LearnKey, Inc. Copyright 2006, All Rights Reserved. Page 14

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

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

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

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

Certification Exam Preparation Seminar: Oracle Database SQL

Certification Exam Preparation Seminar: Oracle Database SQL Oracle University Contact Us: 0800 891 6502 Certification Exam Preparation Seminar: Oracle Database SQL Duration: 1 Day What you will learn This video seminar Certification Exam Preparation Seminar: Oracle

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

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

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

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

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 18.08.2010 20:10:53 Examine the following SQL statement: CREATE TABLE INSTRUCTORS ( ID NUMBER(20),

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

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

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

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

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

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

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

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

SQL Fundamentals. Chapter 3. Class 03: SQL Fundamentals 1

SQL Fundamentals. Chapter 3. Class 03: SQL Fundamentals 1 SQL Fundamentals Chapter 3 Class 03: SQL Fundamentals 1 Class 03: SQL Fundamentals 2 SQL SQL (Structured Query Language): A language that is used in relational databases to build and query tables. Earlier

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

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

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

MIS CURRICULUM. Advanced Excel Course - Working with Templates Designing the structure of a template Using templates for standardization of worksheets

MIS CURRICULUM. Advanced Excel Course - Working with Templates Designing the structure of a template Using templates for standardization of worksheets MIS CURRICULUM ADVANCE EXCEL Advanced Excel Course - Overview of the Basics of Excel Customizing common options in Excel Absolute and relative cells Protecting and un-protecting worksheets and cells Advanced

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

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 7 Introduction to Structured Query Language (SQL)

Database Systems: Design, Implementation, and Management Tenth Edition. Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management Tenth Edition Chapter 7 Introduction to Structured Query Language (SQL) Objectives In this chapter, students will learn: The basic commands and

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

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

Course Outline. [ORACLE PRESS] OCE Oracle Database SQL Certified Expert Course for Exam 1Z

Course Outline. [ORACLE PRESS] OCE Oracle Database SQL Certified Expert Course for Exam 1Z Course Outline [ORACLE PRESS] OCE Oracle Database SQL Certified Expert Course for Exam 1Z0-047 17 Apr 2018 Contents 1. Course Objective 2. Pre-Assessment 3. Exercises, Quizzes, Flashcards & Glossary Number

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

DB2 SQL Class Outline

DB2 SQL Class Outline DB2 SQL Class Outline The Basics of SQL Introduction Finding Your Current Schema Setting Your Default SCHEMA SELECT * (All Columns) in a Table SELECT Specific Columns in a Table Commas in the Front or

More information

Testpassport.

Testpassport. Testpassport http://www.testpassport.cn Exam : 1Z0-051 Title : Oracle Database: SQL Fundamentals I Version : DEMO 1 / 11 1. View the Exhibit and examine the structure of the SALES, CUSTOMERS, PRODUCTS,

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

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

What are temporary tables? When are they useful?

What are temporary tables? When are they useful? What are temporary tables? When are they useful? Temporary tables exists solely for a particular session, or whose data persists for the duration of the transaction. The temporary tables are generally

More information

SQL functions fit into two broad categories: Data definition language Data manipulation language

SQL functions fit into two broad categories: Data definition language Data manipulation language Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition Chapter 7 Beginning Structured Query Language (SQL) MDM NUR RAZIA BINTI MOHD SURADI 019-3932846 razia@unisel.edu.my

More information

Using SQL with SQL Developer 18.2

Using SQL with SQL Developer 18.2 One Introduction to SQL 2 - Definition 3 - Usage of SQL 4 - What is SQL used for? 5 - Who uses SQL? 6 - Definition of a Database 7 - What is SQL Developer? 8 Two The SQL Developer Interface 9 - Introduction

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

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

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

COURSE STUDENT LEARNING OUTCOMES: See attached or in course s learn.unm.edu

COURSE STUDENT LEARNING OUTCOMES: See attached or in course s learn.unm.edu Syllabus Online IT 222(CRN #43196) Data Base Management Systems Instructor: James Hart / hart56@unm.edu Office Room Number: B 123 Instructor's Campus Phone: 505.925.8720 / Mobile 505.239.3435 Office Hours:

More information

Question No : 1 Which three possible values can be set for the TIME_ZONE session parameter by using the ALTER SESSION command? (Choose three.

Question No : 1 Which three possible values can be set for the TIME_ZONE session parameter by using the ALTER SESSION command? (Choose three. Volume: 260 Questions Question No : 1 Which three possible values can be set for the TIME_ZONE session parameter by using the ALTER SESSION command? (Choose three.) A. 'os' B. local C. -8:00' D. dbtimezone

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

Exam code: Exam name: Database Fundamentals. Version 16.0

Exam code: Exam name: Database Fundamentals. Version 16.0 98-364 Number: 98-364 Passing Score: 800 Time Limit: 120 min File Version: 16.0 Exam code: 98-364 Exam name: Database Fundamentals Version 16.0 98-364 QUESTION 1 You have a table that contains the following

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

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

Chapter 7. Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel

Chapter 7. Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel 1 In this chapter, you will learn: The basic commands

More information

Index. Bitmap Heap Scan, 156 Bitmap Index Scan, 156. Rahul Batra 2018 R. Batra, SQL Primer,

Index. Bitmap Heap Scan, 156 Bitmap Index Scan, 156. Rahul Batra 2018 R. Batra, SQL Primer, A Access control, 165 granting privileges to users general syntax, GRANT, 170 multiple privileges, 171 PostgreSQL, 166 169 relational databases, 165 REVOKE command, 172 173 SQLite, 166 Aggregate functions

More information

Database Foundations. 6-9 Joining Tables Using JOIN. Copyright 2014, Oracle and/or its affiliates. All rights reserved.

Database Foundations. 6-9 Joining Tables Using JOIN. Copyright 2014, Oracle and/or its affiliates. All rights reserved. Database Foundations 6-9 Roadmap Introduction to Oracle Application Express Structured Query Language (SQL) Data Definition Language (DDL) Data Manipulation Language (DML Transaction Control Language (TCL)

More information

CIS 363 MySQL. Chapter 12 Joins Chapter 13 Subqueries

CIS 363 MySQL. Chapter 12 Joins Chapter 13 Subqueries CIS 363 MySQL Chapter 12 Joins Chapter 13 Subqueries Ch.12 Joins TABLE JOINS: Involve access data from two or more tables in a single query. The ability to join two or more tables together is called a

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

Subquery: There are basically three types of subqueries are:

Subquery: There are basically three types of subqueries are: Subquery: It is also known as Nested query. Sub queries are queries nested inside other queries, marked off with parentheses, and sometimes referred to as "inner" queries within "outer" queries. Subquery

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

Introduction to Oracle9i: SQL

Introduction to Oracle9i: SQL Introduction to Oracle9i: SQL Student Guide Volume 1 40049GC11 Production 1.1 October 2001 D33990 Authors Nancy Greenberg Priya Nathan Technical Contributors and Reviewers Josephine Turner Martin Alvarez

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

Structured Query Language (SQL)

Structured Query Language (SQL) Structured Query Language (SQL) SQL Chapters 6 & 7 (7 th edition) Chapters 4 & 5 (6 th edition) PostgreSQL on acsmysql1.acs.uwinnipeg.ca Each student has a userid and initial password acs!

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

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

Join, Sub queries and set operators

Join, Sub queries and set operators Join, Sub queries and set operators Obtaining Data from Multiple Tables EMPLOYEES DEPARTMENTS Cartesian Products A Cartesian product is formed when: A join condition is omitted A join condition is invalid

More information

1z0-047 Exam Questions Demo https://www.certifytools.com/1z0-047-exam.html. Oracle. Exam Questions 1z Oracle Database SQL Expert.

1z0-047 Exam Questions Demo https://www.certifytools.com/1z0-047-exam.html. Oracle. Exam Questions 1z Oracle Database SQL Expert. Oracle Exam Questions 1z0-047 Oracle Database SQL Expert Version:Demo 1. Which three possible values can be set for the TIME_ZONE session parameter by using the ALTER SESSION command? (Choose three.) A.

More information

Oracle 1Z Oracle Database SQL Expert. Download Full Version :

Oracle 1Z Oracle Database SQL Expert. Download Full Version : Oracle 1Z0-047 Oracle Database SQL Expert Download Full Version : http://killexams.com/pass4sure/exam-detail/1z0-047 QUESTION: 270 View the Exhibit and examine the structure for the ORDERS and ORDER_ITEMS

More information

1Z0-071 Exam Questions Demo Oracle. Exam Questions 1Z Oracle Database 12c SQL.

1Z0-071 Exam Questions Demo   Oracle. Exam Questions 1Z Oracle Database 12c SQL. Oracle Exam Questions 1Z0-071 Oracle Database 12c SQL Version:Demo 1. the Exhibit and examine the structure of the CUSTOMERS and CUST_HISTORY tables. The CUSTOMERS table contains the current location of

More information

DEFAULT Values, MERGE, and Multi-Table Inserts. Copyright 2009, Oracle. All rights reserved.

DEFAULT Values, MERGE, and Multi-Table Inserts. Copyright 2009, Oracle. All rights reserved. DEFAULT Values, MERGE, and Multi-Table Inserts What Will I Learn? In this lesson, you will learn to: Understand when to specify a DEFAULT value Construct and execute a MERGE statement Construct and execute

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

COPYRIGHTED MATERIAL. Contents. Chapter 1: Introducing T-SQL and Data Management Systems 1. Chapter 2: SQL Server Fundamentals 23.

COPYRIGHTED MATERIAL. Contents. Chapter 1: Introducing T-SQL and Data Management Systems 1. Chapter 2: SQL Server Fundamentals 23. Introduction Chapter 1: Introducing T-SQL and Data Management Systems 1 T-SQL Language 1 Programming Language or Query Language? 2 What s New in SQL Server 2008 3 Database Management Systems 4 SQL Server

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

Lab # 4. Data Definition Language (DDL)

Lab # 4. Data Definition Language (DDL) Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Lab # 4 Data Definition Language (DDL) Eng. Haneen El-Masry November, 2014 2 Objective To be familiar with

More information

1Z0-071 Exam Questions Demo Oracle. Exam Questions 1Z Oracle Database 12c SQL.

1Z0-071 Exam Questions Demo   Oracle. Exam Questions 1Z Oracle Database 12c SQL. Oracle Exam Questions 1Z0-071 Oracle Database 12c SQL Version:Demo 1. the Exhibit and examine the structure of the CUSTOMERS and CUST_HISTORY tables. The CUSTOMERS table contains the current location of

More information

1) Introduction to SQL

1) Introduction to SQL 1) Introduction to SQL a) Database language enables users to: i) Create the database and relation structure; ii) Perform insertion, modification and deletion of data from the relationship; and iii) Perform

More information

Data Definition Language (DDL)

Data Definition Language (DDL) Islamic University of Gaza Faculty of Engineering Computer Engineering Dept. Database Lab (ECOM 4113) Lab 6 Data Definition Language (DDL) Eng. Mohammed Alokshiya November 11, 2014 Database Keys A key

More information

Greenplum SQL Class Outline

Greenplum SQL Class Outline Greenplum SQL Class Outline The Basics of Greenplum SQL Introduction SELECT * (All Columns) in a Table Fully Qualifying a Database, Schema and Table SELECT Specific Columns in a Table Commas in the Front

More information

8) A top-to-bottom relationship among the items in a database is established by a

8) A top-to-bottom relationship among the items in a database is established by a MULTIPLE CHOICE QUESTIONS IN DBMS (unit-1 to unit-4) 1) ER model is used in phase a) conceptual database b) schema refinement c) physical refinement d) applications and security 2) The ER model is relevant

More information

Model Question Paper. Credits: 4 Marks: 140

Model Question Paper. Credits: 4 Marks: 140 Model Question Paper Subject Code: BT0075 Subject Name: RDBMS and MySQL Credits: 4 Marks: 140 Part A (One mark questions) 1. MySQL Server works in A. client/server B. specification gap embedded systems

More information

"Charting the Course... Oracle18c SQL (5 Day) Course Summary

Charting the Course... Oracle18c SQL (5 Day) Course Summary Course Summary Description This course provides a complete, hands-on introduction to SQL including the use of both SQL Developer and SQL*Plus. This coverage is appropriate for users of Oracle11g and higher.

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

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

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

Difficult I.Q on Databases, asked to SCTPL level 2 students 2015

Difficult I.Q on Databases, asked to SCTPL level 2 students 2015 Do you know the basic memory structures associated with any Oracle Database. (W.r.t 10g / 11g / 12c)? The basic memory structures associated with Oracle Database include: System Global Area (SGA) The SGA

More information

Unit Assessment Guide

Unit Assessment Guide Unit Assessment Guide Unit Details Unit code Unit name Unit purpose/application ICTWEB425 Apply structured query language to extract and manipulate data This unit describes the skills and knowledge required

More information

Learn Well Technocraft

Learn Well Technocraft Note: We are authorized partner and conduct global certifications for Oracle and Microsoft. The syllabus is designed based on global certification standards. This syllabus prepares you for Oracle global

More information

Using SQL with SQL Developer Part I

Using SQL with SQL Developer Part I One Introduction to SQL 2 Definition 3 Usage of SQL 4 What is SQL used for? 5 Who uses SQL? 6 Definition of a Database 7 What is SQL Developer? 8 Two The SQL Developer Interface 9 Introduction 10 Connections

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

CHAPTER4 CONSTRAINTS

CHAPTER4 CONSTRAINTS CHAPTER4 CONSTRAINTS LEARNING OBJECTIVES After completing this chapter, you should be able to do the following: Explain the purpose of constraints in a table Distinguish among PRIMARY KEY, FOREIGN KEY,

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

Using SQL with SQL Developer 18.2 Part I

Using SQL with SQL Developer 18.2 Part I One Introduction to SQL 2 - Definition 3 - Usage of SQL 4 - What is SQL used for? 5 - Who uses SQL? 6 - Definition of a Database 7 - What is SQL Developer? 8 Two The SQL Developer Interface 9 - Introduction

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

Interview Questions on DBMS and SQL [Compiled by M V Kamal, Associate Professor, CSE Dept]

Interview Questions on DBMS and SQL [Compiled by M V Kamal, Associate Professor, CSE Dept] Interview Questions on DBMS and SQL [Compiled by M V Kamal, Associate Professor, CSE Dept] 1. What is DBMS? A Database Management System (DBMS) is a program that controls creation, maintenance and use

More information

Displaying Data from Multiple Tables. Copyright 2004, Oracle. All rights reserved.

Displaying Data from Multiple Tables. Copyright 2004, Oracle. All rights reserved. Displaying Data from Multiple Tables Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: Write SELECT statements to access data

More information

1z Exam Code: 1z Exam Name: Oracle Database SQL Expert

1z Exam Code: 1z Exam Name: Oracle Database SQL Expert 1z0-047 Number: 1z0-047 Passing Score: 800 Time Limit: 120 min File Version: 12.0 Exam Code: 1z0-047 Exam Name: Oracle Database SQL Expert 1z0-047 QUESTION 1 Which three statements are true regarding single-row

More information

COSC 304 Introduction to Database Systems SQL DDL. Dr. Ramon Lawrence University of British Columbia Okanagan

COSC 304 Introduction to Database Systems SQL DDL. Dr. Ramon Lawrence University of British Columbia Okanagan COSC 304 Introduction to Database Systems SQL DDL Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca SQL Overview Structured Query Language or SQL is the standard query language

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

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

Retrieving Data Using the SQL SELECT Statement. Copyright 2004, Oracle. All rights reserved.

Retrieving Data Using the SQL SELECT Statement. Copyright 2004, Oracle. All rights reserved. Retrieving Data Using the SQL SELECT Statement Copyright 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to do the following: List the capabilities of SQL

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

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

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

PASS4TEST. IT Certification Guaranteed, The Easy Way!  We offer free update service for one year PASS4TEST IT Certification Guaranteed, The Easy Way! \ http://www.pass4test.com We offer free update service for one year Exam : 1Z0-047 Title : Oracle Database SQL Expert Vendors : Oracle Version : DEMO

More information

618 Index. BIT data type, 108, 109 BIT_LENGTH, 595f BIT VARYING data type, 108 BLOB data type, 108 Boolean data type, 109

618 Index. BIT data type, 108, 109 BIT_LENGTH, 595f BIT VARYING data type, 108 BLOB data type, 108 Boolean data type, 109 Index A abbreviations in field names, 22 in table names, 31 Access. See under Microsoft acronyms in field names, 22 in table names, 31 aggregate functions, 74, 375 377, 416 428. See also AVG; COUNT; COUNT(*);

More information

MySQL by Examples for Beginners

MySQL by Examples for Beginners yet another insignificant programming notes... HOME MySQL by Examples for Beginners Read "How to Install MySQL and Get Started" on how to install, customize, and get started with MySQL. 1. Summary of MySQL

More information

Assignment 6: SQL III Solution

Assignment 6: SQL III Solution Data Modelling and Databases Exercise dates: April 12/April 13, 2018 Ce Zhang, Gustavo Alonso Last update: April 16, 2018 Spring Semester 2018 Head TA: Ingo Müller Assignment 6: SQL III Solution This assignment

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