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
Migration from win 2008 sbs to one win 2008 dc\file server and one win 2008 exchange server.
c# linq - "NOT IN"
drop all indexes
Scale one data series in Excel bar graph
SQL Update Query Not working
Joomla Body ID Tag Using Menu Item Alias
String Replace is not working properly because of my string.
Windows 2000 server and USB 2.0 Iomega External HDD
posting script for a modal window
Call a certificate file from servlet