SQL Server : set a default value for Insert Into query when parameter is null -
i'm trying insert query follow:
insert table1 (column1, column2) values (#value1#, #value2#)
but let's say, want default column2 2/19/2013
when parameter #value2#
null. how accomplish that?
i'm using ibatis framework, , insert statement in xml file, used in db file called controller.
this may you're looking for:
isnull(#value2#,'2/19/2013')
sql sql-server-2005 ibatis
No comments:
Post a Comment