SQL Server and Oracle Database Programming Quiz

Test your knowledge of SQL Server and Oracle database concepts including indexing, cursors, PL/SQL programming, query optimization, and database administration features.

11 Questions Published

Questions

Question 1 Multiple Choice (Multiple Answers)

Which two types of metadata can be retrieved by using the various procedures in the DBMS_METADATA PL/SQL package? (Choose two.)

  1. data definition language (DDL) for all objects in a schema
  2. DDL for all object grants on a table in the database
  3. report of invalidated objects in a schema
  4. report of statistics of an object in the database
Question 2 Multiple Choice (Multiple Answers)

Which two statements are true about SecureFile LOB options? (Choose two.)

  1. The COMPRESSION HIGH option can be enabled only for CLOBs.
  2. The COMPRESSION HIGH option can be enabled for all internal LOBs.
  3. The DECRYPT option can be used to remove encryption only if the LOB column is empty.
  4. The DECRYPT option can be used to remove encryption from LOB columns that are empty or contain data.
Question 3 Multiple Choice (Multiple Answers)

Which two types of query results cannot be stored in the query result cache? (Choose two.)

  1. subquery results
  2. results of a query having the SYSDATE function
  3. results of a query having the GROUP BY clause
  4. results of a query having the DATE data type in the WHERE clause
Question 4 Multiple Choice (Single Answer)

Identify two methods for immunizing PL/SQL code against SQL injection attacks ?

  1. Use subprograms as pasrt of packages instead of stand-alone parameters
  2. Use dynamic SQL’s constructed using concatenation of input values.
  3. Use bind arguments
  4. Usage of the NOT NULL constraint in PL/SQL code can degrade performance
Question 5 Multiple Choice (Multiple Answers)

Which two statements are true about REF CURSOR types?

  1. REF CURSOR types cannot be defined inside a package
  2. SYS_ REFCURSOR can be used to declare cursor variables in stored procedures and functions
  3. A REF CURSOR return type can be declared using %TYPE or %ROWTYPE or a user-defined record.
  4. Only a weak REF CURSOR type can be used as a formal parameter of a stored procedure or function.
Question 6 Multiple Choice (Multiple Answers)

Which two conditions must be true for a PL/SQL function to be cached?

  1. It must be part of a package.
  2. It must be a pipelined table function.
  3. It must not be defined in an anonymous block.
  4. It must have at least one OUT or IN OUT parameter.
Question 7 Multiple Choice (Single Answer)

Which one of the following is the most dynamic kind of business data that can be implemented in a database?

  1. 1. Data about an organization's staff
  2. 2. Data about accounting entries
  3. 3. Data about an organization's structure
  4. 4. Data about an organization's products
  5. 5. Data about transaction activity
Question 8 Multiple Choice (Single Answer)

What are the Text and Image Functions?A. PATINDEX,TEXTPTR,TEXTVALIDB. BINARY_CHECKSUM MIN ,CHECKSUM SUM ,CHECKSUM_AGG STDEV ,COUNT STDEVP ,COUNT_BIG C.BINARY_CHECKSUM MIN ,CHECKSUM SUM ,CHECKSUM_AGG STDEV ,TEXTPTR,TEXTVALID

  1. A only
  2. Both A nad B
  3. B Only
  4. Both B and C
Question 9 Multiple Choice (Single Answer)

Which is the correct query to find the Min, Max and 2nd Max in Sql server?

  1. select min(field4) as Min,Max(field4) as Max,(select Max(field4) from table1 where field4 not in(Select Min(field4) from table1)) as 2nmax from table1
  2. select min(field4) as Min,Max(field4) as Max,(select Min(field4) from table1 where field4 not in(Select Max(field4) from table1)) as 2nmax from table1
  3. select min(field4) as Min,Max(field4) as Max,(select Max(field4) from table1 where field4 not in(Select Max(field4) from table1)) as 2nmax from table1
  4. None of the Above
Question 10 Multiple Choice (Single Answer)

Instead of Cursor what can be used to perform row by row operation there by increasing performance?

  1. Corelated Subquery
  2. Index
  3. TOP()
  4. None
Question 11 Multiple Choice (Single Answer)

How many clustered and non clustered indexex exists for single table

  1. 1,10
  2. 10,10
  3. 1,249
  4. 249,1