Khóa học miễn phí SQL Certificate – Mock Exams nhận dự án làm có lương

SQL Certificate Mock Exams



1. What will be the outcome of the following query?

SELECT ROUND(144.23,-1) FROM dual;
  1. 140
  2. 144
  3. 150
  4. 100

2.In which of the following cases, parenthesis should be specified?

  1. When INTERSECT is used with other set operators
  2. When UNION is used with UNION ALL
  3. When MINUS is used for the queries
  4. None of the above

3. Which of the following are DML commands in Oracle Database?

  1. SELECT
  2. GROUP BY
  3. INTERSECT
  4. INSERT

4. Write a query to display employee details (Name, Department, Salary and Job) from EMP table.

  1. SELECT ename, deptno, sal, job FROM emp;
  2. SELECT * FROM emp;
  3. SELECT DISTINCT ename, deptno, sal, job FROM emp;
  4. SELECT ename, deptno, sal FROM emp;

5.What among the following are different types of Views?

  1. Simple views
  2. Complex views
  3. Both A and B
  4. None of the above

6.What is true about the SET operators?

  1. The SELECT clause should have the same number of columns, data types can be different
  2. The SET operators can be used only for combining two queries
  3. The data type of each column in the 2nd query must match the data type of its corresponding column in the first query.
  4. None of the above

7.Which of the following multi-row operators can be used with a sub-query?

  1. IN
  2. ANY
  3. ALL
  4. All of the above

8. When a table can be created?

  1. When the database is not being used by any user
  2. When the database is newly created
  3. It can be created any time, even when a user is using the database
  4. None of the above

9. Which among the following is a common technique for inserting rows into a table? (Choose the most sensible and appropriate answer)

  1. Using SELECT clause
  2. Manually typing each value into the INSERT clause
  3. Using SET operators
  4. None of the above

10. What among the following is true about a View?

  1. Sub-queries can be embedded in a CREATE VIEW statement
  2. A sub-query used in the CREATE VIEW statement has to have a simple SELECT syntax
  3. You cannot use a WHERE clause in a sub-query when it is used in the CREATE VIEW statement
  4. None of the above

11. Predict the output when below statement is executed in SQL* Plus?

DESC emp
  1. Raises error “SP2-0042: unknown command “desc emp” – rest of line ignored.”
  2. Lists the columns of EMP table
  3. Lists the EMP table columns, their data type and nullity
  4. Lists the columns of EMP table along with their data types

12. What will be the outcome of the query given below?

SELECT 100+NULL+999 FROM dual;
  1. 100
  2. 999
  3. NULL
  4. 1099

13. With respect to the given query, if the JOIN used is replaced with NATURAL JOIN, it throws an error. What is the reason for this error?

  1. When the NATURAL JOIN is used, a WHERE clause is mandatory, omitting which gives an error
  2. The ON clause should be replaced with the USING clause
  3. The words NATURAL, JOIN and USING are mutually exclusively in the context of the same join clause
  4. A query can”t combine the NATURAL JOIN and ON (or USING) clauses while joining.

14.Which of the following syntax models is used in extensively in the software systems worldwide?

  1. ANSI SQL: 1999
  2. Both traditional Oracle syntax and the ANSI SQL: 1999 syntax
  3. Traditional Oracle syntax
  4. All of the options

15.What is true about co-related sub-queries?

  1. The tables used in the main query are also used in a co-related sub-query
  2. The sub-queries which reference a column used in the main query are called co-related sub-queries
  3. The sub-queries which are written without parenthesis are called co-related sub-queries
  4. The sub-queries which mandatorily use different tables than those used in the main query are called co-related sub-queries

16. You issue an UPDATE statement as follows:

UPDATE employees 
SET employee_id   = NULL;
WHERE job_id  = ''CLERK

What will be the outcome of the above statement? (Here the column EMPLOYEE_ID is marked as mandatory by putting a constraint)

  1. The first column of the data set will get updated to NULL
  2. The 3rd column of the first row will get updated to NULL
  3. The 3rd column of all the rows will get updated to NULL
  4. And ORA error will be thrown

17.What is true with respect to the query given above?

  1. It gives an ORA error as the mandatory WHERE clause is not present
  2. The JOIN..ON clause can”t contain more than one condition
  3. The query ignores the last condition and executes without an ORA error
  4. The JOIN..ON clause can be written in the form given above for putting more conditions.

18. Consider the following query.

SELECT e.job_id , e.first_name, d.department_id 
FROM departments D JOIN employees e JOIN BONUS b
USING (job_id );

This query results in an error. What is the reason of the error?

  1. A JOINOUSING can happen only between two tables at a time
  2. USING clause in the query doesn”t have any column from the department
  3. There is no WHERE clause in the query
  4. None of the above

19. Predict the output of the below query

SELECT 50 || 0001
FROM dual
  1. 500001
  2. 51
  3. 501
  4. 5001

20. You create a table and name it as COUNT. What will be the outcome of CREATE TABLE script?

  1. The table will not be created
  2. The table will be created and an underscore will be added automatically to the name COUNT_
  3. An ORA error will be thrown
  4. The table COUNT will be created without any errors

21. What will be the outcome of the following query?

SELECT *
FROM employees
WHERE salary BETWEEN (SELECT max(salary)
			FROM employees
			WHERE department_id  = 100) 
AND (SELECT min(salary) FROM employees where department_id  = 100); 

This query returns an error. What is the reason for the error?

  1. A GROUP BY clause should be used as the function MAX is used
  2. Both the sub-queries cannot use the same department ID in the same outer query
  3. BETWEEN operator cannot be used with a sub-query
  4. SELECT clause should have columns mentioned and not a asterix (*)

22. Which of the following is not a property of functions?

  1. Perform calculations on data
  2. Convert column data types
  3. Modify individual data items
  4. None of the above

23.What is true with respect to INNER JOINS and OUTER JOINS in Oracle DB?

  1. INNER JOIN returns only the rows that are matched
  2. OUTER JOIN returns only the rows that are not matched
  3. OUTER JOIN returns the rows that are matched as well as those which do not match
  4. None of the above

24. Which of the following can create a view even if the base table(s) does not exist?

  1. NOFORCE
  2. FORCE
  3. OR REPLACE
  4. CREATE VIEW

25. Which of the following ANSI SQL: 1999 join syntax joins are supported by Oracle?

  1. Cartesian products
  2. Natural joins
  3. Full OUTER join
  4. Equijoins

26. What among the following are the pre-requisites for creating a table?

  1. CREATE TABLE privilege
  2. Storage space
  3. Data in the table
  4. None of the above

27. What is the syntax for creating a table?

  1. CREATE TABLE [schema.] table (column datatype [DEFAULT expr] [,..] );
  2. CREATE TABLE INTO [schema.] table (column datatype [DEFAULT expr] [,..] );
  3. CREATE TABLE VALUES [schema.] table (column datatype [DEFAULT expr] [,..] );
  4. None of the above

28.You need to display all the non-matching rows from the EMPLOYEES table and the non-matching rows from the DEPARTMENT table without giving a Cartesian product of rows between them. Which of the following queries will give the desired output?

  1. SELECT *
    FROM employees e, department d
    WHERE e.department_id  = d.department_id ; 
    
  2. SELECT *
    FROM employees e NATURAL JOIN department d; 
    
  3. SELECT *
    FROM employees e FULL OUTER JOIN department d
    ON  e.department_id  = d.department_id ; 
    
  4. SELECT *
    FROM employees e JOIN  department d
    ON ( e.department_id  > d.department_id ) ; 

29. Which of the below alphanumeric characters are used to signify concatenation operator in SQL?

  1. +
  2. ||
  3. ::

30.What is the best way to change the precedence of SET operators given the fact that they have equal precedence?

  1. The order of usage of the SET operators can be changed to change the precedence
  2. The equal precedence cannot be changed
  3. Parenthesis can be used to change the precedence
  4. None of the above

31.What will be displayed in the result of this query?

  1. It will display distinct department id(s) contained jointly in EMPLOYEES and DEPARTMENTS table
  2. It will throw ORA error
  3. No rows selected
  4. None of the above

32. Which of the following commands ensures that no DML operations can be performed on a view?

  1. NOFORCE
  2. FORCE
  3. WITH READ ONLY
  4. OR REPLACE

33. What is true about the NOFORCE option in CREATE VIEW statement?

  1. It creates a view even if the base table(s) does not exist.
  2. It creates a view only if the base table(s) exists.
  3. It is the default while creating a view.
  4. None of the above

34. What is true about the OR REPLACE keyword?

  1. Object privileges are lost when a view is created using this keyword
  2. There is no need of re granting the object privileges previously granted on it
  3. Neither of A nor B
  4. None of the above

35. What among the following is a type of Oracle SQL functions?

  1. Multiple-row functions
  2. Single column functions
  3. Single value functions
  4. Multiple columns functions

36. What among the following is a type of single-row function?

  1. VARCHAR2
  2. Character
  3. LONG
  4. NULLIF

37. What is the most appropriate about Multiple Row Functions?

  1. They return multiple values per each row. 
  2. They return one result per group of rows and can manipulate groups of rows. 
  3. They return one result per row and can manipulate groups of rows. 
  4. They return multiple values per a group of row.

38. Which of the following are also called Group functions?

  1. Single row functions
  2. Multi group functions
  3. Multiple row functions
  4. Single group functions.

39. A table T_COUNT has 12 number values as 1, 2, 3, 32, 1, 1, null, 24, 12, null, 32, null. Predict the output of the below query.

SELECT COUNT (*) FROM t_count;
  1. 12
  2. 6
  3. 9
  4. Throws exception because COUNT function doesn”t works with NULL values

40. Pick the element which you must specify while creating a table.

  1. Column name
  2. Column Data type
  3. Column size
  4. All of the above

41. What can be said about the statement given above?

  1. Alternative names have been given for the view
  2. Giving alternative names is mandatory if any column is derived from a function or an expression
  3. Both A and B
  4. None of the above

42. A table T_COUNT has 12 number values as 1, 2, 3, 32, 1, 1, null, 24, 12, null, 32, null. Predict the output of the below query.

SELECT COUNT (num) FROM t_count;
  1. 12
  2. 6
  3. 9
  4. Throws exception because COUNT function doesn”t works with NULL values

43. You need to find the results obtained by the above query only for the departments 100 and 101. Which of the following clauses should be added / modified to the above query?

  1. ON (e.department_id = d.department_id ) should be added
  2. USING (e.department_id ) should be added
  3. WHERE e.department_id in (100,101) should be added
  4. None of the above

44. Which of the following is NOT a GROUP BY extensions in SQL?

  1. GROUP BY
  2. GROUPING SETS
  3. CUBE
  4. ROLLUP

45. What will happen if the above statement is modified as below?

CREATE OR REPLACE VIEW dept_sum_vu(name, maxsal, minsal, avgsal)
AS 
SELECT d.dept_name, MIN(e.salary), MAX(e.salary), AVG (e.salary)
FROM employees e JOIN departments d 
ON (e.department_id= d.dept_id)
GROUP BY d.dept_name; 
  1. It will be no different than the original statement
  2. It will execute successfully giving the same results but change in alias names.
  3. It will throw an ORA error
  4. None of the above

46. What among the following is true about the DELETE statement?

  1. The DELETE statement has to be accompanied by the WHERE clause
  2. It is not mandatory to write a WHERE clause with the DELETE statement
  3. DELETE can remove data from multiple tables at a time
  4. None of the above

47. Assuming the last names of the employees are in a proper case in the table employees, what will be the outcome of the following query?

SELECT employee_id, last_name, department_id  FROM employees WHERE last_name = ''smith
  1. It will display the details of the employee with the last name as Smith
  2. It will give no result.
  3. It will give the details for the employee having the last name as ”Smith” in all Lower case.
  4. It will give the details for the employee having the last name as ”Smith” in all INITCAP case.

48.What among the following happens when we issue a DELETE statement on a table? (Choose the most appropriate answer)

  1. A prompt pops up asking the user whether he/she is sure of deleting the rows requested
  2. The rows obeying the condition given in the DELETE statement are removed immediately
  3. The requested rows are removed immediately without any prompt.
  4. None of the above

49.What is true about the query given above?

  1. This query returns an ORA error
  2. It executes successfully but gives no results
  3. Queries from different tables cannot be used with the SET operators
  4. The query executes successfully and gives the results as expected

50.What will happen if a value is provided to the &N variable in the above query (option C in question 76) does not match with any row? (Choose the best answer)

  1. The statement would throw an ORA error
  2. The statement would return all the rows in the table
  3. The statement would return NULL as the output result.
  4. The statement would return no rows in the result.

51.What is the default sorting order of the results when UNION ALL operator is used?

  1. Descending
  2. Ascending
  3. Either A or B
  4. All of the above

52. A table T_COUNT has 12 number values as 1, 2, 3, 32, 1, 1, null, 24, 12, null, 32, null. Predict the output of the below query.

SELECT COUNT (ALL num) FROM t_count;
  1. 12
  2. 6
  3. 9
  4. Throws exception because COUNT function doesn”t works with NULL values

53.What is the maximum level up to which Sub-queries can be nested?

  1. 255
  2. 100
  3. 2
  4. 16

54. A table T_COUNT has 12 number values as 1, 2, 3, 32, 1, 1, null, 24, 12, null, 32, null. Predict the output of the below query.

SELECT COUNT (DISTINCT num) FROM t_count;
  1. 12
  2. 6
  3. 9
  4. Throws exception because COUNT function doesn”t works with NULL values

55. Here are few statements about VARIANCE function in SQL.

i. The function accepts multiple numeric inputs and returns variance of all the values

ii. The function accepts a number column and returns variance of all column values including NULLs

iii. The function accepts a number column and returns variance of all column values excluding NULLs

Chose the correct combination from the below options.

  1. i and iii
  2. i and ii
  3. ii
  4. iii

56. Which clause is used to filter the query output based on aggregated results using a group by function?

  1. WHERE
  2. LIMIT
  3. GROUP WHERE
  4. HAVING

57. A user named “Kevin” wants to access a table which is owned by another user named “Jonathan”. Which of the following will work for Kevin?

  1. Select * from Kevin.employees;
  2. Select * from jonathan.employees;
  3. Either of A or B
  4. None of the above

58.What is true about the ALL operator used for sub-queries? (Choose the most appropriate answer.)

  1. Returns rows that match all the values in a list/sub-query
  2. Returns rows that match only some values in a list/sub-query
  3. Returns rows only if all the values match in a list/sub-query
  4. All of the above

59. Suppose you select DISTINCT departments and employee salaries in the view query used in above question. What will be the outcome if you try to remove rows from the view dept_sum_vu?

  1. The rows will get removed without any error
  2. Only the first 10 rows will get removed
  3. The rows cannot be deleted.
  4. None of the above

60.What will happen if the SELECT list of the compound queries returns both a VARCHAR2 and a NUMBER data type result?

  1. Oracle will convert them implicitly and return a VARCHAR2 data type result
  2. Oracle will convert them implicitly and return a NUMBER data type result
  3. An ORA error is thrown
  4. None of the above

61. What is true about a schema?

  1. A schema is owned by a database user and has the same name as that user
  2. Each user owns a single schema
  3. Schema objects include database links
  4. All of the above

62. In which order the values will get inserted with respect to the above INSERT statement?

  1. Location_id , manager_id, department_name , department_id
  2. department_id , department_name , manager_id, location_id
  3. department_id , manager_id, department_name , location_id
  4. department_id , department_name , location_id , manager_id

63. What among the following is true about tables?

  1. A default value is given to a table
  2. A default value can be given to a column of a table during an INSERT statement
  3. Either of A or B
  4. None of the above

65. Which of the below SQL query will display employee names, department, and annual salary?

  1. SELECT ename, deptno, sal FROM emp;
  2. SELECT ename, deptno, sal + comm FROM emp;
  3. SELECT ename, deptno, (sal * 12) Annual_Sal FROM emp;
  4. Annual salary cannot be queried since the column doesn”t exists in the table

66. What is true about the SUBSTR function in Oracle DB?

  1. It extracts a string of determined length
  2. It shows the length of a string as a numeric value
  3. It finds the numeric position of a named character
  4. It trims characters from one (or both) sides from a character string

67. Which of the following SELECT statements lists the highest retail price of all books in the Family category?

  1. SELECT MAX(retail) FROM books WHERE category = ''FAMILY
  2. SELECT MAX(retail) FROM books HAVING category = ''FAMILY
  3. SELECT retail FROM books WHERE category = ''FAMILY'' HAVING MAX(retail);
  4. None of the above

68. Which of the following functions can be used to include NULL values in calculations?

  1. SUM
  2. NVL
  3. MAX
  4. MIN

69.Which statements best describes the inference drawn from the questions 34 and 35?

  1. There are duplicate values for job codes
  2. The query executes but results produced are unexpected
  3. There are no duplicate values for departments
  4. None of the above

70. What will be the outcome of the following query?

SELECT length(''hi'') FROM dual;
  1. 2
  2. 3
  3. 1
  4. hi

Answer:

Answer(1): A. The ROUND function will round off the value 144.23 according to the specified precision -1 and returns 140.

Examine the structure of the EMPLOYEES table as given and answer the questions 2 and 3 that follow.

SQL> DESC employees
 Name			 Null?	  Type
 ----------------------- -------- ----------------
 EMPLOYEE_ID		 NOT NULL NUMBER(6)
 FIRST_NAME			  VARCHAR2(20)
 LAST_NAME		 NOT NULL VARCHAR2(25)
 EMAIL			 NOT NULL VARCHAR2(25)
 PHONE_NUMBER			  VARCHAR2(20)
 HIRE_DATE		 NOT NULL DATE
 JOB_ID 		 NOT NULL VARCHAR2(10)
 SALARY 			  NUMBER(8,2)
 COMMISSION_PCT 		  NUMBER(2,2)
 MANAGER_ID			  NUMBER(6)
 DEPARTMENT_ID			  NUMBER(4)

Answer(2): A. Using parenthesis will explicitly change the order of evaluation when INTERSECT is used with other operators.

Answer(3): A, D. On strict grounds, SELECT is a DML command as it is one of the mandatory clauses for manipulation of data present in tables.

Answer(4): A.Select the required from the tables each separated by a
comma.

Answer(5): C. Simple and Complex views are two types of views.
Simple views are based on a subquery that references only one table and doesn”t include group
functions, expressions, or GROUP BY clauses. Complex views are based on a subquery that
retrieves or derives data from one or more tables and can contain functions or grouped data.

Answer(6): C. All the combined should have the same no. of columns
when using SET operators. The corresponding columns in the queries that make up a compound
query must be of the same data type group.

Answer:(7) D. Multiple-row subqueries return more than one row of results.Operators that
can be used with multiple-row subqueries include IN, ALL, ANY, and EXISTS.

Answer(8): C. An index can be created to speed up the query process.
DML operations are always slower when indexes exist. Oracle 11g creates an index for PRIMARY
KEY and UNIQUE constraints automatically. An explicit index is created with the CREATE INDEX
command. An index can be used by Oracle 11g automatically if a query criterion or sort
operation is based on a column or an expression used to create the index.

Answer(9): A. Using the SELECT clause is the most common technique
for inserting rows into tables. It reduces the effort of manually keying in values for each
column.

Answer(10): A. View definition can make use of sub-queries.

Answer(11): C. DESCRIBE is used to show the table structure along
with table columns, their data type and nullity

Answer(12): C. Any arithmetic operation with NULL results in a NULL.

Answer()13: C, D.

Answer(14): C. The ANSI SQL: 1999 syntax though not used as much as
the traditional Oracle syntax, it still is one of the syntaxes that may be used in Oracle SQL

Answer(15): B. Correlated subquery references a column in the outer query and executes the subquery once for every row in the outer query while Uncorrelated subquery executes the subquery first and passes the value to the outer query.

Answer(16): D. The constraints on the column must be obeyed while updating its value. In the given UPDATE statement, error will be thrown because the
EMPLOYEE_ID column is a primary key in the EMPLOYEES table which means it cannot be NULL.

Answer(17): D. The WHERE clause can be omitted and the relevant conditions can be accommodated in the JOIN..ON clause itself as shown in the given query

Answer(18): A. Table1 JOIN table2 JOIN table3 is not allowed without the ON clauses for between each JOIN

Answer(19): C. The leading zeroes in the right operand of expression are ignored by Oracle.

Answer(20): A, C. You cannot create a table with the name same as an Oracle Server reserved word.

Answer(21): C. The BETWEEN operator can be used within a sub-query but not with a sub-query.

Answer(22): D. Functions can perform calculations, perform case conversions and type conversions.

Answer(23): A, C. A join can be an inner join,in which the only records returned have a matching record in all tables,or an outer join, in which records can be returned regardless of whether there”s a matching record in the join.An outer join is created when records need to be included in the results without having corresponding records in the join tables. These records are matched with NULL records so that they”re included in the output.

Answer(24): B. Ff you include the FORCE keyword in the CREATE clause, Oracle 11g creates the view in spite of the absence of any referenced tables. NOFORCE is the default mode for the CREATE VIEW command, which means all tables and columns must be valid, or the view isn”t created.

Answer(25): D.

Answer(26): A, B. A user must possess the CREATE TABLE privilege and must have sufficient space to allocate the initial extent to the table segment.

Answer(27): A.

Answer(28): C. The FULL OUTER JOIN returns the non-matched rows from both the tables. A full outer join includes all records from both tables, even if no corresponding record in the other table is found.

Answer(29): B.In SQL, concatenation operator is represented by two vertical bars (||).

Answer(30): C. Parenthesis can be used to group the specific queries in order to change the precedence explicitly. Parentheses are preferred over other SET operators during execution.

Answer(31): A. UNION Returns the combined rows from two queries, sorting them and removing duplicates.

Answer(32): C. The WITH READ ONLY option prevents performing any DML operations on the view. This option is used often when it”s important that users can only query data, not make any changes to it.

Answer(33): B, C. NOFORCE is the default mode for the CREATE VIEW command, which means all tables and columns must be valid, or the view isn”t created.

Answer(34): B. The OR REPLACE option notifies Oracle 11g that a view with the same name might already exist; if it does, the view”s previous version should be replaced with the one defined in the new command.

Answer(35): A. There are basically two types of functions – Single row and Multiple row functions.

Answer(36): B. Character, Date, Conversion, General, Number are the types of Single row functions.

Answer(37): B. Multiple Row functions always work on a group of rows and return one value per group of rows.

Answer(38): C. Group functions are same as Multi row functions and aggregate functions.

Answer(39): A. The COUNT(*) counts the number of rows including duplicates and NULLs. Use DISTINCT and ALL keyword to restrict duplicate and
NULL values.

Answer(40): D. A table must have atleasr one column, its data type specification, and precision (if required).

Answer(41): C. Specifying alias name is good practice to improve the readability of the code and the view queries.

Answer(42): C. COUNT (column) ignores the NULL values but counts the duplicates.

Answer(43): C. The NATURAL JOIN clause implicitly matches all the identical named columns. To add additional conditions the WHERE clause can be used.

Answer(44): A. GROUPING SETS operations can be used to perform multiple GROUP BY aggregations with a single query.

Answer(45): B. The sequence of the column alias not matters much as they don”t carry any behavioral attribute.

Answer(46): B. The WHERE clause predicate is optional in DELETE statement. If the WHERE clause is omitted, all the rows of the table will be deleted.

Answer(47): B. Provided the last names in the employees table are in a proper case, the condition WHERE last_name = ”smith” will not be satistified and hence no results will be displayed.

Answer(48): C. As a part of the active or a new transaction, the rows in the table will be deleted.

Answer(49): D. A compound query is one query made up of several queries using different tables.

Answer(50): D.

Answer(51): B. A compound query will by default return rows sorted across all the columns,from left to right in ascending order.The only exception is UNION ALL, where the rows will not be sorted. The only place where an ORDER BY clause is permitted is at the end of the compound query.

Answer(52): C. COUNT(ALL column) ignores the NULL values but counts the duplicates.

Answer(53): A.

Answer(54): B. COUNT (DISTINCT column) counts the distinct not null values.

Answer(55): C. The VARIANCE function accepts single numeric argument as the column name and returns variance of all the column values considering
NULLs.

Answer(56): D. HAVING Clause is used for restricting group results. You use the HAVING clause to specify the groups that are to be displayed, thus further restricting the groups on the basis of aggregate information. The HAVING clause can precede the GROUP BY clause, but it is recommended that you place the GROUP BY clause first because it is more logical. Groups are formed and group functions are calculated before the HAVING clause is applied to the groups in the SELECT list.

Answer(57): B.

Answer(58): C. ”> ALL” More than the highest value returned by the subquery. ”< ALL” Less than the lowest value returned by the subquery. ”< ANY” Less than the highest value returned by the subquery. ”> ANY” More than the lowest value returned by the subquery. ”= ANY” Equal to any value returned by the subquery (same as IN). ”[NOT] EXISTS” Row must match a value in the subquery.

Answer(59): C. The view DEPT_SUM_VU is still a complex view as it uses DISTINCT keyword. Hence, DML operations are not possible on it.

Answer(60): C. Oracle does not convert data types implicitly.

Answer(61): D. The user space in a database is known as schema. A schema contains the objects which are owned or accessed by the user. Each user can have single schema of its own.

Answer(62): B. If the columns are mentioned in the INSERT clause, the VALUES keyword should contain values in the same order

Answer(63): B. A default value can be specified for a column during the definition using the keyword DEFAULT.

Answer(65): C. Use numeric expressions in SELECT statement to perform basic arithmetic calculations.

Answer(66): A. The SUBSTR(string, x, y) function accepts three parameters and returns a string consisting of the number of characters extracted from the source string, beginning at the specified start position (x). When position is positive, then the function counts from the beginning of string to find the first character. When position is negative, then the function counts backward from the end of string.

Answer(67): A. Since the category FAMILY has to be restricted before grouping, table rows must be filtered using WHERE clause and not HAVING clause.

Answer(68): B. NVL is a general function to provide alternate values to the NULL values. It can really make a difference in arithmetic calculations using AVG, STDDEV and VARIANCE group functions.

Answer(69): C. As the combination of the job codes and departments is unique, there are no duplicates obtained.

Answer(70): A. the LENGTH function simply gives the length of the string.

Khóa học lập trình tại Toidayhoc vừa học vừa làm dự án vừa nhận lương: Khóa học lập trình nhận lương tại trung tâm Toidayhoc