Oracle SQL Test
Oracle SQL Test
Oracle SQL Test
1. What are features of Primary Key a. Must Be Unique b. Must be Not Null c. A table can have only one Primary Key. d. All the Above. 2. In E-R Model Attributes are represented by a. Rectangle b. Circle c. Oval d. None 3. De- Normalization will result in a. Duplicate Data b. Eliminate Duplicate Data c. Complex Data. d. None 4. A relation is in First Normal Form a. All attributes have repeated Groups b. Have multi value c. Atomic d. None 5. Any change made to the Physical Level should not affect the Logical or User Level a. Information Rule b. View Updation Rule c. Physical Independent Rule d. Logical Independent Rule 6. What is the Process of simplifying Data in to Small tables is known as a. Normalization
b. De Normalization c. Structure d. None 7. Example of Candidate Key a. Foreign Key b. Alternate Key c. Secondary Key d. None
8. In E-R Model Key Constraints are represented as a. Dark Line b. Arrow c. Thin Line d. None 9. In E-R Model Weak Entity is represented by a. Dark Rectangle Box b. Oval c. Line d. None 10.A row is also known as a. Field b. Attribute c. Tuple d. None 11.Merge Statements are discussed under a. DML b. DDL c. TCL d. None 12.TRUNCATE command will keep the Table and remove data permanently a. TRUE
b. FALSE 13.What is the result if the following query executes: SELECT DEPTNO,MAX(SAL) FROM EMP; a. No Error b. Error 14.What is the result if the query executes(SAL=3000,COMM=NULL): SELECT SAL+COMM FROM EMP WHERE EMPNO=7654; a. Error b. 3000 c. NULL d. None 15.What is the default length for CHAR Datatype a. 1 b. 1000 c. No Default Length d. None
16.Examine the query: SELECT * FROM EMP WHERE SAL>2000 AND SAL<3000; Which operator can replace the AND operator a. IN b. BETWEEN c. IS NULL d. NONE 17.What is the output for the following query: SELECT SQRT(POWER(2,2)) FROM DUAL; a. 4 b. 2 c. 0 d. None
18.What is the output for the following Query: SELECT ROUND(8.765,-1) FROM DUAL; a. 10 b. 0 c. 20 d. None 19.What is the output for the following Query: SELECT ROUND(SYSDATE,MONTH) FROM DUAL; Assume sysdate is 12-Aug-2012 a. 01-Aug-2012 b. 01-Jul-2012 c. 30-Aug-2012 d. None 20.The Dictionary view used to get information of UNUSED Columns: a. USER_UNUSED_TABS b. USER_TABS c. USER_UNUSED_COL_TABS d. None 21.The dictionary view used to get information for Comment s on Tables a. USER_COMMENTS b. USER_COMMENT_TABS c. USER_TAB_COMMENTS d. None 22.By Default LTRIM function will remove a. White spaces from the Left b. Removes the String left side c. Removes the string from right side d. None 23.Which function can be used with Numeric and Date values a. SUBSTR b. INSTR c. ROUND d. None 24.What is the output of the function ADD_MONTHS(14-JAN-2012,-1)
a. 14-FEB-2012 b. 14-DEC-2011 c. 14-JAN-2012 d. None 25.What is the output for the query: SELECT ABS(FLOOR(-3/2)) FROM DAUL; a. 2 b. 1 c. 0 d. None 26.SELECT ABS(CEIL(-3/2)) FROM DUAL a. 0 b. 1 c. 2 d. Error 27.The command that will mark JOB as UNUSED a. ALTER TABLE EMP SET UNUSED COLUMN JOB; b. ALTER TABLE EMP SET COLUMN UNUSED JOB; c. ALTER TABLE EMP UNUSED SET COLUMN JOB; d. NONE 28.Which of the following Statement will release a LOCK? a. INSERT b. UPDATE c. COMMIT d. NONE 29.Which Dictionary is a VIEW for USER_CATALOG a. TAB b. CAT c. TABS d. NONE 30.USER_VIEW will give information about Views. a. FALSE b. TRUE 31.The User cannot create Synonym for
a. TABLE b. VIEW c. SEQUENCE d. NONE 32.How can a User modify the SOURCE CODE of View a. CREATE b. REPLACE c. CREATE OR REPLACE d. NONE 33.We cannot perform a DML operation on a View when a. Simple View b. View with WHERE condition c. View with GROUP clause d. None 34.Which of the following is a SET operator a. <> b. = c. LIKE d. UNION ALL 35.Check the following Code: SELECT DEPTNO,JOB,SUM(SAL) FROM EMP GROUP BY DEPTNO,JOB UNION SELECT TO_NUMBER(NULL),JOB,SUM(SAL) FROM EMP GROUP BY JOB; a. Error b. No Error 36.Check the following Code: SELECT SUM(SAL) FROM EMP GROUP BY DEPTNO; a. Error b. No Error 37.How many join condition will exists if we join 100 tables a. 100 b. 200 c. 99 d. 1
38.Display all the matched and unmatched data from both the Tables a. RIGHT OUTER JOIN b. FULL OUTER JOIN c. COMPLETE OUTER JOIN d. LEFT OUTER JOIN 39.To use the NATURAL JOIN a. Table must have common columns b. Table can have un common columns c. Table must have all common columns d. None 40.If 2 tables have more than one common columns in them, and we need to join with one column, we use? a. NATURAL JOIN b. USING Clause c. WITH Clause d. None 41.Which Operator will check multiple values from the INNER QUERY a. In b. = c. > d. None 42.In which Query first executes Inner Query and then Outer Query a. Co-Related Query b. Nested Sub Query c. Scalar Sub Query d. None 43.Which query will return the Second Minimum Salary a. SELECT MIN(SAL) FROM EMP WHERE SAL>(SELECT MIN(SAL) FROM EMP); b. SELECT MIN(SAL) FROMEMP WHERE SAL<(SELECT MIN(SAL) FROM EMP); c. SELECT MIN(SAL) FROM EMP WHERE SAL>=2; d. None
44.Which Sub Query will accepts only one value a. IN b. ANY c. ALL d. = 45.What will the command do? ALTER INDEX IX1 REBUILD; a. Re create Index b. Rebuild Index c. Disable Index d. None 46.The Dictionary view that will get the Status of the Object(VALID OR INVALID) a. USER_OBJECT b. USER_TABLES c. USER_OBJECTS d. NONE 47.Which is Valid Table Name a. EMP!TEST b. EMP TEST c. EMP_TEST d. NONE 48.The Command used to Create a New Table from an existing table without copying data a. CREATE TABLE EMP1 AS SELECT * FROM EMP; b. CREATE TABLE EMP1 AS SELECT * FROM EMP WHERE 1=2; c. CREATE TABLE EMP1 AS SELECT * FROM EMP WHERE JOB=CLERK d. NONE 49.TAB is a a. View b. Synonym c. Table d. None 50.All SAVEPOINTS will be cancelled after issuing COMMIT
a. TRUE b. FALSE