Prepare these 30+ Oracle SQL Interview Questions specially shortlisted by SV Soft Solutions Team to give a boost for your upcoming Oracle related job interviews. Therefore prepare these short Oracle SQL based Interview FAQ Questions Answers to crack the interviews.
Varchar can store upto 2000 bytes and varchar2 can store upto 4000 bytes. Varchar will occupy space for NULL values and Varchar2 will not occupy any space. Both are differed with respect to space.
RAW datatype is used to store values in binary data format. The maximum size for a raw in a table in 32767 bytes.
In Oracle, months_between function is used to find number of months between the given dates. Example is –
Months_between(Date 1, Date 2)
Oracle has been developed using C Language.
Nested table is a data type in Oracle which is used to support columns containing multi valued attributes. It also hold entire sub table.
Data Manipulation Language (DML) is used to access and manipulate data in the existing objects. DML statements are insert, select, update and delete and it won’t implicitly commit the current transaction.
COALESCE function is used to return the value which is set to be not null in the list. If all values in the list are null, then the coalesce function will return NULL.
Comments in Oracle can be represented in two ways –
- Two dashes(–) before beginning of the line – Single statement
- /*—— */ is used to represent it as comments for block of statement
Translate is used for character by character substitution and Replace is used substitute a single character with a word.
Merge statement is used to select rows from one or more data source for updating and insertion into a table or a view. It is used to combine multiple operations.
The USING clause is used to specify with the column to test for equality when two tables are joined.
[sql]Select * from employee join salary using employee ID[/sql]
Employee tables join with the Salary tables with the Employee ID.
Duplicate rows can be removed by using the keyword DISTINCT in the select statement.
NULL value represents missing or unknown data. This is used as a place holder or represented it in as default entry to indicate that there is no actual data present.
A table is set to be key preserved table if every key of the table can also be the key of the result of the join. It guarantees to return only one copy of each row from the base table.
Aggregate function is a function where values of multiple rows or records are joined together to get a single value output. Common aggregate functions are –
Sub Query is also called as Nested Query or Inner Query which is used to get data from multiple tables. A sub query is added in the where clause of the main query.
There are two different types of subqueries:
- Correlated sub query
A Correlated sub query cannot be as independent query but can reference column in a table listed in the from list of the outer query.
- Non-Correlated subquery
This can be evaluated as if it were an independent query. Results of the sub query are submitted to the main query or parent query.
The WITH CHECK option clause specifies check level to be done in DML statements. It is used to prevent changes to a view that would produce results that are not included in the sub query.
A GROUP BY clause can be used in select statement where it will collect data across multiple records and group the results by one or more columns.
Cross join is defined as the Cartesian product of records from the tables present in the join. Cross join will produce result which combines each row from the first table with the each row from the second table.
A privilege is nothing but right to execute an SQL query or to access another user object. Privilege can be given as system privilege or user privilege.
[sql]GRANT user1 TO user2 WITH MANAGER OPTION;[/sql]
Describe <Table_Name> is used to get the field details of a specified table.
Oracle provides following temporal data types:
- Date Data Type – Different formats of Dates
- TimeStamp Data Type – Different formats of Time Stamp
- Interval Data Type – Interval between dates and time
VArray is an oracle data type used to have columns containing multivalued attributes and it can hold bounded array of values.
Rename is a permanent name given to a table or a column whereas Alias is a temporary name given to a table or column. Rename is nothing but replacement of name and Alias is an alternate name of the table or column.
A cursor variable is associated with different statements which can hold different values at run time. A cursor variable is a kind of reference type.
SET operators are used with two or more queries and those operators are Union, Union All, Intersect and Minus.
View is a logical table which based on one or more tables or views. The tables upon which the view is based are called Base Tables and it doesn’t contain data.
Each cursor in Oracle has set of attributes which enables an application program to test the state of the cursor. The attributes can be used to check whether cursor is opened or closed, found or not found and also find row count.
Duplicate rows in the table can be deleted by using ROWID.
An integrity constraint is a declaration defined a business rule for a table column. Integrity constraints are used to ensure accuracy and consistency of data in a database. There are types – Domain Integrity, Referential Integrity and Domain Integrity.
The NVL function is used to replace NULL values with another or given value. Example is –
NVL(Value, replace value)
A BLOB data type is a varying length binary string which is used to store two gigabytes memory. Length should be specified in Bytes for BLOB.
These 30+ Oracle Job Interview Questions will definitely help you out to crack your oracle related job interviews. If you want to know more about Oracle SQL Online Training, then contact us today and avail free demo session, certification program discount offers and a lot more.