My table will contain the following values. h1,h2,h3 are varchar fields with size 1
**Register Date Year Batch h1 h2 h3**
1138M0321 02-08-2013 3 1 A A NULL
1138M0323 02-08-2013 3 1 P P NULL
1138M0324 02-08-2013 3 1 P P NULL
1138M0325 02-08-2013 3 1 P P NULL
I need to update one of these fields*(h1/h2/h3)* with NULL. But I can only add "" and not actually NULL How can I update the table with NULL?
The NULL
value must be SQL, not a .NET value, so instead of trying things like:
"... SET h1 = " & NULL & " ... "
Simply use this in the query:
"... SET h1 = NULL ... "
Note that:
Null values cannot be used for information that is required to distinguish one row in a table from another row in a table, such as primary keys.
See MSDN Documentation.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments