Link to home
Start Free TrialLog in
Avatar of Ali Saad
Ali SaadFlag for Kuwait

asked on

How to convert empty value to nulll when insert or update

Hello
in SQL Server 2005,I want to prevent any empty value in some columns in a table in updating or inserting and if user entered the empty value in a column it must convert to null instead
Avatar of chapmandew
chapmandew
Flag of United States of America image

you could put a default value on the field...which would apply for inserts only, but you would have to write a function to do it and bind it to the column.  I dont' suggest this option.  I would write a trigger to do it.
ASKER CERTIFIED SOLUTION
Avatar of BrandonGalderisi
BrandonGalderisi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial