Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Server 2008 Has Nanosecond Precision?

Status
Not open for further replies.

SQLDenis

Programmer
Oct 1, 2005
5,575
US
it looks like SQL Server 2008 has nanosecond precision

if you run the following

Code:
DECLARE @t time
SELECT @t ='0:0'
SELECT @t AS Time1,dateadd(ms,1,@t) AS TimeMilli,
dateadd(ns,10000,@t) AS TimeNano1,dateadd(ns,100,@t) AS TimeNano2

The output is this

Code:
Time1 00:00:00.0000000	
TimeMilli 00:00:00.0010000	
TimeNano1 00:00:00.0000100	
TimeNano2 00:00:00.0000001

Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQLBlog.com, Google Interview Questions
 
Yes it does. In either the TIME, datetimeoffset and datetime2 data types. I've actually got an article going up tonight or tomorrow which covers the 4 new date and time data types (as well as some other stuff). I'll provide the link as soon as it's released.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Who knows. And I can only imagine how it's going to handle the funky leap years that some of those countries used when they where syncing up there calenders.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Who knows. And I can only imagine how it's going to handle the funky leap years that some of those countries used when they where syncing up there calenders.

Ignore it and call it a feature.

Christiaan Baes
Belgium

"My old site" - Me
 
lol.

In true Microsoft fashion.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top