willwillis
willwillis

Reputation: 118

insert now() into a Sybase timestamp field

I'm new to sybase and google was anything but helpful. All I want to do is insert a valid time for "right now" into a timestamp field. The mysql equivalent is now(). I tried getdate() and got funny results.

Thanks.

Upvotes: 1

Views: 7614

Answers (1)

David
David

Reputation: 73554

You can't insert data into a timestamp column.

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.sqlug/html/sqlug/sqlug247.htm

Added

I should have included this right away to be nice, but a Timestamp field is updated to the current date/time automatically when a row is modified.

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.help.ase_15.0.blocks/html/blocks/blocks35.htm

Upvotes: 3

Related Questions