The LIKE SQL keyword is used along with ... Which SQL keyword is used to specify conditional search?

What is an index? --An index is a database table attribute, which speeds-up data search within a t able. --An index is a special way to join 2 or more tables. --An index is the same as alias. What is the INSERT command used for? What is the purpose of the SQL AS clause? --The AS clause is used with the JOIN clause only. --The AS SQL clause is used change the name of a column in the result set or to assign a name to a derived column. --The AS clause defines a search condition. What is the difference between the WHERE and HAVING SQL clauses? The INNER JOIN clauseâ ¦ --returns all rows that have matching value in the field on which the 2 tables a re joined. --returns only the rows from the first table, which have non-matching values wit h the second table in the field on which the 2 tables are joined. --returns all rows from 2 tables. Which of the following SQL statements is correct? --SELECT FROM Sales WHERE Date BETWEEN ('10-dec-2005', '01-dec-2006') --SELECT FROM Sales WHERE Date BETWEEN '10-dec-2005' AND '01-dec-2006' --SELECT * FROM Sales WHERE Date BETWEEN '10-dec-2005' AND '01-dec-2006' 1. Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2(25) LAST_NAME VARCHAR2(25) Which three statements inserts a row into the table? (Choose three) A. INSERT INTO employees VALUES ( NULL, 'John','Smith'); B. INSERT INTO employees( first_name, last_name) VALUES('John','Smith'); C. INSERT INTO employees

B. GRANT manager ROLE TO BLAKE. CREATE ROLE manager.' e.employee_id) WHEN EXISTS THEN .last_name.CLARK. Create and assign a MANAGER role to Blake and Clark 2. INSERT INTO employees (employee_id) VALUES (1000). GRANT create table.first_name '. 'John'. D. GRANT manager ROLE TO BLAKE. create view TO manager. first_name.name = e.first_name '.last_name WHEN NOT MATCHED THEN INSERT values(e. CREATE ROLE manager.CLARK.NULL). GRANT create table.' e. last_name) VALUES ( 1000.''). GRANT create table. C. employee_id) VALUES ( 1000. F. e. Examine the structure of the EMPLOYEES and NEW_EMPLOYEES tables: EMPLOYEES EMPLOYEE_ID FIRST_NAME LAST_NAME HIRE_DATE NUMBER Primary Key VARCHAR2(25) VARCHAR2(25) DATE NEW_EMPLOYEES EMPLOYEE_ID NUMBER Primary Key NAME VARCHAR2(60) Which MERGE statement is valid? A. B. GRANT manager TO BLAKE.CLARK. MERGE INTO new_employees c USING employees e ON (c.'Smith'). INSERT INTO employees (employee_id.employee_id = e.employee_id) WHEN MATCHED THEN UPDATE SET C.VALUES ('1000'. create voew TO BLAKE CLARK. 'John'.employee_id.last_name). E. MERGE new_employees c USING employees e ON (c. 2. You need to perform these tasks: 1.'John'. create voew TO manager. Grant CREATE TABLE and CREATE VIEW privileges to Blake and Clark Which set of SQL statements achieves the desired results? A. INSERT INTO employees(first_name.employee_id = e. 3.

DELETE.' e.' e. e.name = e. The two statements produce identical results.last_name WHEN NOT MATCHED THEN INSERT INTO new_employees valueS(e. MERGE new_employees c FROM employees e ON (c.first_name '.first_name '.' e.' e. INSERT.last_name). Evaluate these two SQL statements: '.' e. There is no need to specify DESC because the results are sorted in descending order by default. What is true about them? A. SELECT last_name. hire_date FROM EMPLOYEES ORDER BY salary DESC. 5. salary. SELECT D. MERGE INTO new_employees c USING employees e ON (c.employee_id) WHEN EXISTS THEN UPDATE SET C. D.employee_id. SELECT last_name. hire_date FROM EMPLOYEES ORDER BY 2 DESC.employee_id = e. none B. C. The two statements can be made to produce identical results by adding a colum n alias for the salary column in the second SQL statement. The second statement returns a syntax error.employee_id. Which object privileges can be granted on a view? A. e. SELECT.last_name WHEN NOT MATCHED THEN INSERT values(e. salary.employee_id.employee_id) WHEN MATCHED THEN UPDATE SET c. DELETE.first_name '. DELETE.' e.first_name '.first_name '. ALTER.last_name). D.name = e. C. string .SELECT C. INSERT. Which four are types of functions available in SQL? (Choose 4) A.name = e.last_name).employee_id = e.first_name 4. B. e.last_name WHEN NOT MATCHED THEN INSERT values(e. INSERT. UPDATE 6.UPDATE SET C.

A SELECT statement can be used to perform these three functions: . join C. SELECT student_id.0.3) Which statement finds students who have a grade point average (GPA) greater than 3. join E. numeric F. character C. gpa FROM student_grades WHERE semester_end BETWEEN '01-JAN-2001' AND '31-DEC-2001' AND gpa gt 3. selection. SELECT student_id. difference. projection. selection. difference. product 8.Choose columns from a table. gpa FROM student_grades WHERE semester_end BETWEEN '01-JAN-2001' AND '31-DEC-2001' OR gpa > 3.Bring together data that is stored in different tables by creating a link betw een them. projection.0 for the calendar year 2001? A. projection. intersection. .Choose rows from a table. Which set of keywords describes these capabilities? A. intersection.. C. projection. SELECT student_id. calendar E. integer D. gpa FROM student_grades . The STUDENT_GRADES table has these columns STUDENT_ID NUMBER(12) SEMESTER_END DATE GPA NUMBER(4. join D. translation G.B. . B. date H. join B. conversion 7.

9. Examine the statement: Create synonym emp for hr. D. gpa FROM student_grades WHERE semester_end BETWEEN '01-JAN-2001' AND '31-DEC-2001' AND gpa > 3. UPDATE employee SET first_name = 'John' AND last_name = 'Smith' WHERE employee_id = 180.0. SET last_name = 'Smoth' WHERE employee_id = 180. You create a table called employees in the HR schema based on you EMP table. E. D. SELECT student_id. UPDATE employees SET first_name = 'John'. You will have two identical tables in the HR schema with different names. B. last_name = 'Smith' WHERE employee_id = 180. .0. Identify the appropriate builtin to use for each of the following requirements: Calculate the number of days until the end of the month.0. An error is generated. C. C. UPDATE employee SET first_name = 'John'. SELECT student_id. You create an alternative name for the employees table in the HR schema in yo ur own schema. UPDATE employees SET first_name = 'John' SET last_name = 'Smith' WHERE employee_id = 180.WHERE semester_end BETWEEN '01-JAN-2001' AND '31-DEC-2001' AND gpa > 3. What happens when you issue the statement? A. D. gpa FROM student_grades WHERE semester_end > '01-JAN-2001' OR semester_end < '31-DEC-2001' AND gpa >= 3. Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER Primary Key FIRST_NAME VARCHAR2 (25) LAST_NAME VARCHAR2 (25) HIRE_DATE DATE Which UPDATE statement is valid? A. B.employees. 10.

Fill out a number in a string with leading zeroes. Extract the last four characters in a string. Determine the length of a string. change std_company_id to com pany_id ). How many months are between date1 and date2 ? I store all my names in uppercase in the database. Convert a date to a string. Extract the word found between the first and second _ delimiters in a string. but want to display them in r eports in upper and lowercase. Find the third S in a string Get the first day in the month for a specified date. Convert a string to a date. Replace all instances of _ with a #. Convert a string to lower case. Find the last blank in a string. Return the error message associated with a SQL error code. Return the largest integer less than a specified value. Find the Saturday nearest to the last day in March 1992. Review all new hires on the first Wednesday after they'd been working for three . Convert a number to a string. Remove a certain prefix from a string (for example.Capitalize the first character in a word and lowercase the rest of the word.

What is the current date and time? What is the date of the last day in the month? .months. Strip all leading numeric digits from a string.

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.