I recently discovered a table in our Sybase database at work that uses a column of type 'timestamp'. If I create a table using this mysterious timestamp datatype like this
create table dropme (
foo timestamp,
roo int null
)
insert into dropme (roo) values(123)
insert into dropme (roo) values(122)
insert into dropme (roo) values(121)
select * from dropme
go
I get the following ouput from 'select * from dropme':
foo roo
-------------------- -----------
0x000100000e1ce4ea 123
0x000100000e1ce4ed 122
0x000100000e1ce509 121
0x000100000e1ce4ea does not look very timestampy to me. Also, I see this output from 'sp_help timestamp':
Type_name Storage_type Length Prec Scale Nulls Default_name Rule_name Access_Rule_name Identity
--------- ------------ ------ ---- ----- ----- ------------ --------- ---------------- ----------
timestamp varbinary 8 NULL NULL 1 NULL NULL NULL NULL
My questions are the following
- What the heck is a timestamp?
- Does it have any relation at all to time or date?
- Can I convert it to a datetime?
- If its not a time or a date, what do you use it for?