|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
SQL Update Question
I have a pretty simple question on updating a date value within a table. I know the solution is a simple one but this is new to me so here goes.
I have to remove the date for 2 items within a table. Not sure if this is the proper way to do it. UPDATE request_tbl SET date = ' ' where line_id in ('0002146421','0003359594'); I'd appreciate any suggestions on this. |
|
#2
|
|||
|
|||
|
If this date column is not defined NOT NULL then you can do so, but this is a best practice to set the value of such a column as NULL instead of space or blank string.
UPDATE request_tbl SET date = NULL -- set date equal to null where line_id in ('0002146421','0003359594'); UPDATE request_tbl SET date = ' ' -- your query is also correct, put the spaces where line_id in ('0002146421','0003359594'); Remember spaces or null string is not equal to NULL. |
|
#3
|
|||
|
|||
|
Thanks
Great. Thanks a bunch for your help.
|
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > SQL Update Question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|