SQL Server interview questions: -What is CTE (Common table expression)?
- By Shiv Prasad Koirala in SQL
- Jan 4th, 2013
- 1500
- 0
You can also read our 10 SQL Server interview questions from here.
This SQL Server interview question was asked in Cognizant to one of our readers.
CTE is a temporary result set which can be used within a execution of a SINGLE insert,update,delete or select query.
Using CTE is a 4 step process:-
- All CTE starts with "with" clause.
- After with you need to define CTE name and the field names. For instance in the below code snippet I have 3 fields Count,Column and Id. The name of CTE is "MyTemp".
- Once you have defined CTE we need to specify the SQL which will give the result for the CTE.
- Finally you can use the CTE in your SQL query.

You can also see SQL Server Interview questions CTE (Common table expression):-
Shiv Prasad Koirala
Visit us @ www.questpond.com or call us at 022-66752917... read more
- By Shiv Prasad Koirala
- Jan 17th, 2012
- 13437
- 0
.NET interview questions: - Can you elaborate project life cycle?
- By Shiv Prasad Koirala
- Aug 3rd, 2011
- 10203
- 0
Five most important SharePoint 2010 interview questions
- By Shiv Prasad Koirala
- Nov 16th, 2011
- 9930
- 0

