SQL Questions

Q:

Which command using Query Analyzer will give you the version of SQL server and operating system?

Answer

SELECT SERVERPROPERTY ('productversion'), SERVERPROPERTY ('productlevel') and SERVERPROPERTY ('edition').

Report Error

View answer Workspace Report Error Discuss

Subject: SQL

0 2817
Q:

How can you find a PL/SQL block, if the cursor is open?

Answer

By use of %ISOPEN status variable.


 

Report Error

View answer Workspace Report Error Discuss

Subject: SQL

0 2813
Q:

What is a linked server in SQL server?

Answer

It enables SQL server to address diverse data sources like OLE DB similarly. It allows Remote server access and has the ability to issue distributed queries, updates, commands and transactions.

Report Error

View answer Workspace Report Error Discuss

Subject: SQL

0 2809
Q:

The SQL SELECT statement is capable of

A) Projection B) Selection
C) Protection & Security D) Both A & B
 
Answer & Explanation Answer: D) Both A & B

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: SQL
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

2 2772
Q:

Which SQL keyword is used to sort the result-set?

A) ORDER B) ORDER BY
C) SORT BY D) SORT
 
Answer & Explanation Answer: B) ORDER BY

Explanation:

SQL keyword ORDER BY is used to sort the result-set.

Report Error

View Answer Report Error Discuss

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

1 2698
Q:

How to create recursive query in SQL Server?

Answer

Recursive query can be create in SQL using stored procedure but you can also use CTE (Common table expression). It might be also worth asking about performance as CTE is not always very fast.

Report Error

View answer Workspace Report Error Discuss

Subject: SQL

0 2642
Q:

Which one of the following sorts rows in SQL?

A) ORDER BY B) GROUP BY
C) SORT BY D) ALIGN BY
 
Answer & Explanation Answer: A) ORDER BY

Explanation:
Report Error

View Answer Report Error Discuss

0 2610
Q:

What are the rules to use the ROWGUIDCOL property to define a globally unique identifier column?

Answer

Only one column can exist per table that is attached with ROWGUIDCOL property. One can then use $ROWGUID instead of column name in select list.

Report Error

View answer Workspace Report Error Discuss

Subject: SQL

0 2606