Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing connection to SQL Server
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01685573
Message ID:
01685583
Views:
33
>>>Personally I use SELECT @@IDENTITY or even SELECT CAST(0 as bit) , but query any other system variable will do the same.
>>
>>Both you and Dragan know only about 1000 times more than I do :)
>>
>>I wish there was a definitive way to find out which one is faster Select @@version or SELECT @@IDENTITY. For me, the resulting number is not important. Only if the SELECT worked or no.
>>
>>Thank you!
>
>
>SELECT @@VERSION -- Returns nvarchar variable, not sure how long it is
>SELECT @@IDENTITY -- Returns 4 byte int
>SELECT CAST(0 as bit) - returns 1 bit.
>
When I run SELECT @@IDENTITY in my SSMS (of SQL 2008), the returned value is NULL. Why?

Also, how is SELECT CAST(0 as bit) different from SELECT ""? That is, neither one (as far as I know) hits the SQL Server. No?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform