Microsoft
Software
Hardware
Network
Question : disable default "CURRENT_TIMESTAMP" field when executing UPDATE query
Hi,
I have a field called datetime that's set to default "CURRENT_TIMESTAMP" and when I execute an "UPDATE" query the field datetime get's the current time...is there someway to disabled this while I'm running the "Update" query?
I need to update some records and it's affecting the datetime field.
update my_t set name='John' where name='Johnny' -> after running this the field datetime gets the current time which is not good.
Cheers!
Answer : disable default "CURRENT_TIMESTAMP" field when executing UPDATE query
in the update query, if you are not specifying the datetime field with some value, then pass the current value itself
something like :
update <table> set <field1> = <yourvalue> , <datetime field> = <datetime field> where....
Random Solutions
SSIS package error while migrating to sql server 2005 64 bit
How to open the DetailsView in Insert Mode
data recovery from a laptop hard drive?
Exchange Management Tools Fails to Install
Vista won't recognize external usb sound card
Report based on query ... can I see other table fields ?
c# dataview as a binding source
Deciphering AS/400 Terminal traffic
How do I increase the volume for iPhone system type sounds when my app starts?
SQL query - date usage rate / usage rate period