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.
Questions
Which two types of metadata can be retrieved by using the various procedures in the DBMS_METADATA PL/SQL package? (Choose two.)
- data definition language (DDL) for all objects in a schema
- DDL for all object grants on a table in the database
- report of invalidated objects in a schema
- report of statistics of an object in the database
Which two statements are true about SecureFile LOB options? (Choose two.)
- The COMPRESSION HIGH option can be enabled only for CLOBs.
- The COMPRESSION HIGH option can be enabled for all internal LOBs.
- The DECRYPT option can be used to remove encryption only if the LOB column is empty.
- The DECRYPT option can be used to remove encryption from LOB columns that are empty or contain data.
Which two types of query results cannot be stored in the query result cache? (Choose two.)
- subquery results
- results of a query having the SYSDATE function
- results of a query having the GROUP BY clause
- results of a query having the DATE data type in the WHERE clause
Identify two methods for immunizing PL/SQL code against SQL injection attacks ?
- Use subprograms as pasrt of packages instead of stand-alone parameters
- Use dynamic SQL’s constructed using concatenation of input values.
- Use bind arguments
- Usage of the NOT NULL constraint in PL/SQL code can degrade performance
Which two statements are true about REF CURSOR types?
- REF CURSOR types cannot be defined inside a package
- SYS_ REFCURSOR can be used to declare cursor variables in stored procedures and functions
- A REF CURSOR return type can be declared using %TYPE or %ROWTYPE or a user-defined record.
- Only a weak REF CURSOR type can be used as a formal parameter of a stored procedure or function.
Which two conditions must be true for a PL/SQL function to be cached?
- It must be part of a package.
- It must be a pipelined table function.
- It must not be defined in an anonymous block.
- It must have at least one OUT or IN OUT parameter.
Which one of the following is the most dynamic kind of business data that can be implemented in a database?
- 1. Data about an organization's staff
- 2. Data about accounting entries
- 3. Data about an organization's structure
- 4. Data about an organization's products
- 5. Data about transaction activity
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
- A only
- Both A nad B
- B Only
- Both B and C
Which is the correct query to find the Min, Max and 2nd Max in Sql server?
- 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
- 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
- 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
- None of the Above
Instead of Cursor what can be used to perform row by row operation there by increasing performance?
- Corelated Subquery
- Index
- TOP()
- None
How many clustered and non clustered indexex exists for single table
- 1,10
- 10,10
- 1,249
- 249,1