.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> Sql Server >> Post New Question Subscribe to Interview Questions

How to use case statement in SQL Query?

Posted By :volvo     Posted Date :December 26, 2013    Points :40   Category :Sql Server 
select
Case when field1 = 1
then 'One'
else 'Two'
End from TableName

You can also find related Interview Question to How to use case statement in SQL Query?  below: 

What are the Four Main query statement?Explain them?

  
Four Query Statement:Select ,Insert, Update and Delete .
Select -- To retrieve a information form a table.
Insert -- To Insert a Value into a table.
Update -- To update a exists value into a table.
Delete -- To delete a row from a Table. (More...)

What is Query evaluation engine?

  
It executes low-level instruction generated by compiler. (More...)

What is Query binding ?

  
The binding of an object to a query (More...)

How many Columns per INSERT statement is allowed

  
4096 Columns allowed in per Insert SQL (More...)

Can multiple catch blocks be executed for a single try statement?

  
No. Once the proper catch block processed, control is transferred to the finally block (if any).

So we can not execute multiple catch block in one try block (More...)

Is it possible to use InProc mode for sessionState in case of web garden?

  
No, it's not possible. As InProc mode is dependent on the worker process and in case of web garden, we have multiple worker process so session handling becomes difficult. Either we can use StateServer or SQL server mode for web garden.

Thanks. (More...)

What is the equivalent statement for exit in C#?

  
Application.Exit() or System.Environment.Exit (More...)

Is XML case-sensitive?

  
Yes XML case-sensitive? (More...)

Is SQL case sensitive?

  
No SQL is not case sensitive? (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend