SQL Test Answer Part-07

  61. Examine the two SQL statements given below: SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY salary DESC SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY 2 DESC What is true about them? a. The two statements produce identical results b. The second statement returns an error c. There is no need … Continue Reading →

SQL Test Answer Part-06

  51. Are both the statements correct? (a) where deptno in(2,4,5) (b) where deptno=2 or deptno=4 or deptno =5 a. True b. False Answer: a. true 52. What is wrong with the following query? Select* from orders where OrderID=(select OrderID from OrderItems where ItemQty > 50) a. In the sub query, ‘*’ should … Continue Reading →

SQL Test Answer Part-05

  41. Which are not DCL operations? Insert Grant Delete Update Revoke Commit Rollback Answer: a. Insert, c. Delete, d. Update, f. Commit, g. Rollback DCL: Grant, Revoke 42. Which of the following is not a DML command? Set transaction Explain plan Update Grant Insert Create Alter Revoke Answer: a. Set … Continue Reading →

SQL Test Answer Part-04

  31. Which of the following date function(s) are valid? NEXT_DATE NEXT_MONTH MONTHS_BETWEEN DAYS_BETWEEN Answer: a, b, c, d. 32. Which of the following clauses are not allowed in a single row sub-query? From Where Group by Having Order by Answer: e. Order by 33. How can data be accessed … Continue Reading →

SQL Test Answer Part-03

  21. What does MOD () function do? Returns the remainder after division Modifies the column definition Modifies the definition of a table None of the above Answer: a. Returns the remainder after division 22. Which of the following statement is correct regarding table creation? Tables once created cannot not … Continue Reading →

SQL Test Answer Part-02

11. Which of the following is not a query operator? a. Union b. Union All c. Intersect d. Minus e. Minus All Answer: e. Minus All 12. Which of the following is not a type of constraint? Primary key Unique Check Distinct Default Answer: d. Distinct 13. What are the programs that execute automatically whenever DML … Continue Reading →

SQL Test Answer Part-01

1. The purpose of the domain is to constrain the set of valid values. True or false? True False Answer: a. true 2. TRUNC () truncates or chops off digits of precision from a number. True false Answer: a. True 3. Which of the following statements is true? (a) The … Continue Reading →