Note 1
##### Take Note:

Take a note while surfing.

##### Note With Ink

Give your Note a Colorful Tag.

##### Easy to Access

Stay on same information and in Sync wherever you are.

Note 2
##### Take Note:

Organize your information,It may take Shape.

##### Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3
##### Take Note:

Don't Let information to miss,Because it take shape

##### Note With Ink

Simple an Easy Way to take a note.

##### Easy to Access

Get the same in next visit.

# Technical Interview Questions and Answers :: SQL

#### More Topics

Question :: 21
What is CONNECT_BY clause?

No Discussion on this question yet!

Tags:No Tags on this question yet!

Question :: 22
What is Analytic function?

No Discussion on this question yet!

Tags:No Tags on this question yet!

Question :: 23
What is difference between View and Force View?

No Discussion on this question yet!

Tags:Virtusa

Question :: 24
What is MERGE statement?

No Discussion on this question yet!

Tags:No Tags on this question yet!

Question :: 25
What is Cartesian Product?

No Discussion on this question yet!

Tags:No Tags on this question yet!

Question :: 26
Write a query to select the second highest salary from a table.

SELECT max(salary) AS salary2 FROM orders WHERE salary < (SELECT max(salary) AS salary1 FROM orders)

Tags:TCS Accenture

Question :: 27
Write a query to select the 5th highest salary from a table.

SELECT min(salary) AS high5 FROM employee WHERE salary IN(SELECT DISTINCT TOP 5 salary FROM orders ORDER BY salary DESC)

Tags:TCS

Question :: 28
How to find duplicate records with the number they are duplicated?

SELECT Id, count (*) as number_records from table group by id having count (*) > 1.

Question :: 29
Using query analyzer, name 3 ways you can get an accurate count of the number of records in a table.

a. select count (coumnName(s)) from tableName.
b. select count_big(coumnName(s)) from tableName
c. select columnName from tableName
select @@ROWCOUNT as rowCount

Tags:No Tags on this question yet!

Question :: 30
What is the difference between Delete and Truncate command in SQL?

Delete command and truncate command both will delete the data, however the truncate command can not be rolled back as delete can be. The delete command can be used for selected records using the where clause but with the truncate command we have to loose data. DELETE statement is a logged operation and hence takes more time then truncate.