SQL Questions

Q:

What are constraints? Mention the different types of constraints?

Answer

Constraints enable the RDBMS to enforce the integrity of the database automatically, without the need to create triggers, rule or defaults.


Types of Constraints: NOT NULL, CHEQUE, UNIQUE, PRIMARY KEY, FOREIGN KEY.

Report Error

View answer Workspace Report Error Discuss

Subject: SQL

0 1882
Q:

What is the difference between a primary key and a unique key?

Answer

By default, primary key creates a clustered index on the column, whereas a unique key creates a non clustered index by default.

Report Error

View answer Workspace Report Error Discuss

Subject: SQL

0 1830
Q:

Mention the difference between clustered and a non-clustered index?

Answer

- A clustered index is a special type of index that reorders the way records in the table are physically stored. Therefore table can have only one clustered index.


- A non clustered index is a special type of index in which the logical order of the index does not match the physical stored order of the rows on disk. The leaf node of a non clustered index does not consist of the data pages. Instead, the leaf nodes contain index rows.

Report Error

View answer Workspace Report Error Discuss

Subject: SQL

0 1828
Q:

Name any three PL/SQL exceptions?

Answer

Too_many_rows.


No_Data_Found.


Zero_Error.


 

Report Error

View answer Workspace Report Error Discuss

Subject: SQL

0 1824
Q:

We can modify an existing Company from

A) Company Info > Alter B) Gateway of Tally > Modify Company
C) Company Info > Alter Company D) All of the above
 
Answer & Explanation Answer: A) Company Info > Alter

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: SQL
Job Role: Analyst , Database Administration , IT Trainer

1 1745
Q:

Oracle SQL developer is an

Answer

Oracle SQL developer is an Oracle Database IDE.

Report Error

View answer Workspace Report Error Discuss

0 1598
Q:

A database is used to

A) store data B) modify data
C) extract data D) All of the above
 
Answer & Explanation Answer: D) All of the above

Explanation:

A database is used to store, modify, extract and to search for the data within it.

Report Error

View Answer Report Error Discuss

1 1525
Q:

Which of the following statements is true concerning subqueries?

A) Does not start with the word SELECT. B) Involves the use of an inner and outer query.
C) Cannot return the same result as a query that is not a subquery. D) All of the above
 
Answer & Explanation Answer: B) Involves the use of an inner and outer query.

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: SQL
Job Role: Analyst , Database Administration , IT Trainer

0 1484