SQL Server Performance Forum – Threads Archive
Interesting
Guess what happens when u run this command ? CREATE TABLE T1 ( TIMESTAMP )Creates a table called T1 with a single column called timestamp (datatype=timestamp).<br /><br />Ok, I didn’t guess[<img src=’/community/emoticons/emotion-4.gif’ alt=’
![Stick Out Tongue :p :p](styles/default/xenforo/smilies/tongue.png)
How will you insert records now ?
Strange [<img src=’/community/emoticons/emotion-1.gif’ alt=’
![Smile :) :)](styles/default/xenforo/smilies/smile.png)
You should have other column to see the value of TimeStamp Declare @t TABLE ( TIMESTAMP ,i int)
insert into @t(i) select 1
select * from @t
Madhivanan Failing to plan is Planning to fail
Just in case… TIMESTAMP in SQL Server has nothing to do with DATEs and or TIME. SQL Server knows ROWVERSION as the synonym for TIMESTAMP. However running the above statement with ROWVERSION fails. —
Frank Kalis
Microsoft SQL Server MVP
http://www.insidesql.de
Heute schon gebloggt?http://www.insidesql.de/blogs
Ich unterstütze PASS Deutschland e.V. http://www.sqlpass.de)
I wonder why SQL Server allows a table having only one column which is of TimeStamp that cant be inserted explicitly Madhivanan Failing to plan is Planning to fail
Maybe because db design should be done by people who know what they are doing? There is no protection against stupidity. [<img src=’/community/emoticons/emotion-5.gif’ alt=’
![Wink ;) ;)](styles/default/xenforo/smilies/wink.png)
What about SET STUPIDITY LEVEL ? ( server-wide setting ) <img src=’/community/emoticons/emotion-5.gif’ alt=’;-)’ /><br />
I’d much rather have … SET SERENDIPITY OFF
ROTFLMAO [<img src=’/community/emoticons/emotion-2.gif’ alt=’
![Big Grin :D :D](styles/default/xenforo/smilies/biggrin.png)
quote:Originally posted by Madhivanan
I wonder why SQL Server allows a table having only one column which is of TimeStamp that cant be inserted explicitly
Madhivanan
Failing to plan is Planning to fail
Because TIMESTAMP is reserved for internal usage only, it is NOT intended to be used by users/applications et. al. That is why we have DATETIME…
]]>