adspace
How to select true false based on column value in sql server?
Answer Posted / Narendra Pal Singh
In SQL Server, you can use the CASE statement to create conditional logic that returns a true or false (1 or 0). Here's an example:nn```sqlnSELECT ColumnNamenFROM YourTablenWHERE CASE WHEN ColumnValue = 'desired_value' THEN 1 ELSE 0 END = 1;```
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is sql server query analyzer?
How can we solve concurrency problems?
What is standby servers? Explain types of standby servers.
How to rebuild the master database?
How to enter binary string literals in ms sql server?
what is the Ticketing tool used in Wipro technologies at Bangalore...???
How to provide default values to function parameters?
Can we do dml on views?
What are the different SQL Server Versions you have worked on?
Is it possible to have clustered index on separate drive from original table location?
When should you use an instead of trigger?
explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration
What are the different types of subquery?
what is spatial nonclustered index
What are wait types?