I have a column which is bool. How can I set true, false values for that? Here is my query :
Update [mydb].[dbo].[myTable] SET isTrue = ( CASE WHEN Name = \
Use IIF function of sql server
DECLARE @a int = 45, @b int = 40; DECLARE @a int = 45, @b int = 40; SELECT IIF ( @a > @b, 'TRUE', 'FALSE' ) AS Result; Result -------- TRUE (1 row(s) affected)
For Your Problem
Update [mydb].[dbo].[myTable] SET isTrue = ( Name = 'Jason', 'TRUE', 'FALSE' )