Problem with ON UPDATE CURRENT_TIMESTAMP
Problem with ON UPDATE CURRENT_TIMESTAMP
(OP)
It's supposed to be possible to put a "DEFAULT CURRENT_TIMESTAMP" and/or "ON UPDATE CURRENT_TIMESTAMP" clause on a TIMESTAMP or DATETIME column when creating a table. I'm getting an error on the "ON UPDATE". Is this not possible with MS SQL Server?
I'm an Oracle guy adrift in a SQL Server world.
CODE --> DDL
CREATE TABLE testTbl ( id INT, txt VARCHAR(100), ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP );
CODE --> Error
Msg 156, Level 15, State 1, Line 9 Incorrect syntax near the keyword 'ON'.
I'm an Oracle guy adrift in a SQL Server world.