How to select true false based on column value in sql server?
Answer / 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 |
How can I create a new template for import ? : sql server management studio
if a parameter is not send to a stored procedure what type of identifier is to be used in Stp and if that parameter is not feed to the a query inside the Stp how to validate with out useing IF condition
How can i change the column name.
13 Answers HCL, Yardi Software,
How does clustered and non clustered index work?
How many files can a database contain in sql server?how many types of data files exists in sql server? How many of those files can exist for a single database?
What is the use of nvl work?
Explain about service Broker functions?
What do you understand by intent locks?
What is a mutating table error and how can you get around it?
optimization techinques
What is the security model used in sql server 2005?
In the primary key have a multiple field or not?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)