Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 getdate() db_name() db_id() .........

Author  Topic 

dbthj
Posting Yak Master

143 Posts

Posted - 2010-06-11 : 10:14:14
SQL returns the current timestamp from SELECT GETDATE()
and current database from SELECT DB_NAME()
and current database id from SELECT DB_ID()

I tried to find a list of other handy-dandy () items in B.O.L.
but I couldn't find one.

Are there a lot of these puppies? Anybody got a list?

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2010-06-11 : 10:20:20
Google is your friend. http://msdn.microsoft.com/en-us/library/ms174318.aspx

--
Gail Shaw
SQL Server MVP
Go to Top of Page

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-06-11 : 10:20:33
have you tried
select MS_SQL_PUPPIES()



No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2010-06-11 : 10:21:37
So is Books Online, it's installed in the same Start menu group as the other SQL Server programs.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-06-14 : 03:35:14
Read about Metadata Functions and Deterministic and Nondeterministic Functions in SQL Server help file

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -