SQL (Structured Query Language) Interview Preparation Guide
Download PDF

SQL Interview Questions and Answers will guide us now that SQL (Structured Query Language) is a database computer language designed for managing data in relational database management systems (RDBMS), and originally based upon Relational Algebra. So learn SQL or get preparation for the job of SQL (Structured Query Language) with the help of this SQL Interview Questions with Answers guide

172 SQL Questions and Answers:

Table of Contents

SQL Interview Questions and Answers
SQL Interview Questions and Answers

1 :: What is SQL (Structured Query Language)?

SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database.

2 :: What is the SQL*Plus?

SQL*Plus is an application that recognizes & executes SQL commands & specialized SQL*Plus commands that can customize reports, provide help & edit facility & maintain system variables.

3 :: What is NVL?

NVL : Null value function converts a null value to a non-null value for the purpose of evaluating an expression. Numeric Functions accept numeric I/P & return numeric values. They are MOD, SQRT, ROUND, TRUNC & POWER.

4 :: What is a Character Functions?

Character Functions are INITCAP, UPPER, LOWER, SUBSTR & LENGTH. Additional functions are GREATEST & LEAST. Group Functions returns results based upon groups of rows rather than one result per row, use group functions. They are AVG, COUNT, MAX, MIN & SUM.

5 :: What is SET?

SET command changes the system variables affecting the report environment.

6 :: What is a TTITLE & BTITLE?

TTITLE & BTITLE are commands to control report headings & footers.

7 :: What is sql BREAK?

BREAK command clarify reports by suppressing repeated values, skipping lines & allowing for controlled break points.

8 :: What is sql JOIN?

JOIN is the form of SELECT command that combines info from two or more tables.
Types of Joins are Simple (Equijoin & Non-Equijoin), Outer & Self join.
Equijoin returns rows from two or more tables joined together based upon a equality condition in the WHERE clause.
Non-Equijoin returns rows from two or more tables based upon a relationship other than the equality condition in the WHERE clause.
Outer Join combines two or more tables returning those rows from one table that have no direct match in the other table.
Self Join joins a table to itself as though it were two separate tables.

9 :: What is sql COMPUTE?

command control computations on subsets created by the BREAK command.

10 :: What is SQL*Loader?

SQL*Loader is a product for moving data in external files into tables in an Oracle database. To load data from external files into an Oracle database, two types of input must be provided to SQL*Loader : the data itself and the control file. The control file describes the data to be loaded. It describes the Names and format of the data files, Specifications for loading data and the Data to be loaded (optional). Invoking the loader sqlload username/password controlfilename <options>.

11 :: What is sql Consistency?

Consistency : Assures users that the data they are changing or viewing is not changed until the are thro' with it.

12 :: What is sql Set Transaction?

Set Transaction is to establish properties for the current transaction.

13 :: What is sql Posting?

Posting is an event that writes Inserts, Updates & Deletes in the forms to the database but not committing these transactions to the database.

14 :: Explain Order of SQL statement execution?

Where clause, Group By clause, Having clause, Order By clause & Select.

15 :: What is sql Synonyms?

Synonyms is the alias name for table, views, sequences & procedures and are created for reasons of Security and Convenience.
Two levels are Public - created by DBA & accessible to all the users. Private - Accessible to creator only. Advantages are referencing without specifying the owner and Flexibility to customize a more meaningful naming convention.

16 :: What is sql Multiple columns?

Multiple columns can be returned from a Nested Subquery.

17 :: What is sql Minus?

Minus is the product of two tables listing only the non-matching rows.

18 :: What is sql Union?

Union is the product of two or more tables.

19 :: What is sql Transaction?

Transaction is defined as all changes made to the database between successive commits.

20 :: What is sql Locking?

Locking are mechanisms intended to prevent destructive interaction between users accessing data. Locks are used to achieve.

21 :: What is sql Savepoint?

Savepoint is a point within a particular transaction to which you may rollback without rolling back the entire transaction.

22 :: What is sql Commit?

Commit is an event that attempts to make data in the database identical to the data in the form. It involves writing or posting data to the database and committing data to the database. Forms check the validity of the data in fields and records during a commit. Validity check are uniqueness, consistency and db restrictions.

23 :: What is sql Sequences?

Sequences are used for generating sequence numbers without any overhead of locking. Drawback is that after generating a sequence number if the transaction is rolled back, then that sequence number is lost.

24 :: What is sql Correlated Subquery?

Correlated Subquery is a subquery that is evaluated once for each row processed by the parent statement. Parent statement can be Select, Update or Delete. Use CRSQ to answer multipart questions whose answer depends on the value in each row processed by parent statement.

25 :: What is sql Intersect?

Intersect is the product of two tables listing only the matching rows.