Posts

Showing posts from 2019

Dynamic SQL to Apply IsNULL on All Columns of a table

Dynamic SQL to Apply IsNULL on All Columns of a table according to data type. SELECT  'isnull('+COLUMN_NAME+',' +CASE WHEN  DATA_TYPE ='varchar' THEN ''''')' WHEN  DATA_TYPE ='datetime' THEN 'getdate())' ELSE '0)' END ,* FROM INFORMATION_SCHEMA.columns WHERE TABLE_NAME='Property' AND IS_NULLABLE='NO'

Convert MySQLCode to SQL Server Online

Convert MySQLCode to SQL Server Online http://www.sqlines.com/online