Oracle Databases and SQL
Comprehensive quiz covering Oracle database concepts including data types, SQL commands, indexes, constraints, tablespace management, joins, and PL/SQL programming.
Questions
what is the maximum length of all Oracle Objects?
- <=30 characters
- <=40 characters
- <=32 characters
- <=20 characters
In Oracle can we do any DMLs in a function which is called from a select statement?
- True
- False
In Oracle, is the following Anonymous block is valid? Declare Begin End;
- True
- False
In an Outer Join, what happens to columns that are not matched?
- All matched columns returns NULLS.
- All unmatched columns returns NULLS.
- All matched and unmatched columns returns NULLS.
- Cant say
User_Source table contains code for which all Objects?
- Functions
- Package body
- Triggers
- Cursor
For which of these constraints, an unique index is automatically created while creating constraints?
- Foreign Key
- Primary Key
- Check
- Unique
- Not Null
Which of the following clause enables to drop the foreign key constraints of the child table while dropping the parent table?
- drop foreign keys
- cascade constraints
- this is not possible in oracle
- clear references
What is the difference between varchar and varchar2 data types?
- maximum length for varchar is 2000 bytes and for varchar2 is 4000 bytes
- varchar is used to store fixed length character data, varchar2 is for variable length character data
- varchar data type is not supported in oracle
- varchar is applicable only to PL/SQL
How many columns are presented after executing this query:SELECT address1||','||address2||','||address2 "Adress" FROM employee;
- 1
- 2
- 3
- 0
- 4
Which Oracle access method is the fastest way for Oracle to retrieve a single row?
- Primary key access
- Access via unique index
- Table access by ROWID
- Full table scan
To produce a meaningful result set without any cartesian products, what is the minimum number of conditions that should appear in the WHERE clause of a four-table join?
- 8
- 2
- 3
- 4
- 5
Assuming today is Monday, 10 July 2000, what is returned by this statement: SELECT to_char(NEXT_DAY(sysdate, 'MONDAY'), 'DD-MON-RR') FROM dual;
- 03-JUL-00
- 10-JUL-00
- 12-JUL-00
- 11-JUL-00
- 17-JUL-00
Which character is used to continue a statement in SQL*Plus?
- *
- /
- -
- @
When a user creates an object without a TABLESPACE clause, where will Oracle store the segment?
- System tablespace
- Users tablespace
- Default tablespace for the user
- Oracle will give an error
- Undefined
The primary key on table EMP is the EMPNO column. Which of the following statements will not use the associated index on EMPNO?
- select * from EMP where nvl(EMPNO, '00000') = '59384'
- select * from EMP where EMPNO = '59384'
- select EMPNO, LASTNAME from EMP where EMPNO = '59384'
- select 1 from EMP where EMPNO = '59834'
Which character function can be used to return a specified portion of a character string
- INSTR
- SUBSTRING
- SUBSTR
- POS
Which command will delete all data from a table and will not write to the rollback segment?
- DROP
- DELETE
- CASCADE
- TRUNCATE
Which of the following can be a valid column name
- Column
- 1966_Invoices
- Catch_#22
- #Invoices
- None of the above
Teradata has been called a __________ architecture.
- Anything Goes
- Shared Nothing
- Shared Everything
- Dual Redundant
A column of a table is declared as NUMBER(10,2).For which of the following values oracle returns an error
- 5392845.324
- 871039453.1
- 97234512.123
- 1234567.12