New data types introduced in SQL SERVER 2008

          

Interview questions

New data types introduced in SQL SERVER 2008

Next>>         SQL Server tutorial  

SQL Server - new data types introduced in SQL SERVER - Feb 27, 2010 at 11:50 AM by Shuchi Gauri

Explain the new data types introduced in SQL SERVER 2008.

New data types introduced in SQL Server 2008:

  • Date and Time: Date, Time, DateTime2, and DateTimeOffSet. Date stores Dates only in YYYY-MM-DD format. Time stores only time in hh:mm:ss:nnnnnnn format.
    DateTime2 is similar to DateTime but has a higher precision and range in YYYY-MM-DD hh:mm:ss:nnnnnnnm format. DateTimeOffSet is similar to DateTime2 but includes information for timezone as well in YYYY-MM-DD hh:mm:ss[.nnnnnnn] [+|-]hh:mm format.
  • Spatial: Geometry and Geography. Geometry is used to store planar data i.e. xy coordinates. Geography is used to store ellipsoidal data. i.e. latitudes and longitudes.
  • HierarchyId: Used to store values representing positions of nodes in a hierarchical tree structure.
  • Filestream: Stores BLOBs outside the database in file system and points to it from a column.

SQL Server - new data types introduced in SQL SERVER - May 05, 2009 at 22:00 PM by Rajmeet Ghai

Explain the new data types introduced in SQL SERVER 2008.

New date and time data types considering time zones as below:

  • Date – For Date
  • Time – For time
  • Datetime2- Used for a larger ractional seconds and year range than the existing DATETIME datatype
  • Datetimeoffset – Saves Date time along with timezone.
  • FILESTREAM- Used to store unstructured large object (LOB in the NTFS file system.
  • HIERARCHYID- Used to store depth and breadth for tree like structures.
  • Geography- stores points, lines, polygons, and collections of latitude and longitude coordinates. This data type is .Net based.
  • Geometry- Stores geographical features. This data type is .Net based.

SQL Server - new data types introduced in SQL SERVER - June 21, 2009 at 09:00 AM by Amit Satpite

DATETIME2

This is a new data type and has larger fractional seconds and year range with an option of specifying the number of fractions ranging from 0 to 7.

DECLARE @dt datetime2(2)
SET @dt7 = Getdate()
PRINT @dt7
Result: 2009-01-13 23:10:11.70.

The fractional parameter defined the accuracy of fractional output.

Next>>

Also read

XML Data type implementation in SQL Server 2005

What is Untyped XML?
Provide examples for : Create a table with a untype XML column, Insert into an untyped XML data type column
What is typed XML?
The XML data type comes with five methods. Explain them
Differentiate between Untyped XML and Typed XML.
Explain with an example how to apply defaults constraint to an XML data type column.
You can add constraints to XML data type columns. Illustrate with an example.

Querying and modifying XML data in SQL Server 2005

What is XQuery language?
Explain the syntax rule of XQuery language.
XQuery expression contains two parts: the Prolog and the Body. Explain them
Explain PATH expression in XQuery with an example.

How can I disable or rename SA account in SQL Server 2005?

SA account in SQL server can be renamed or disabled using ALTER LOGIN command............

FOR XML in SQL Server 2005

Discuss the TYPE directive of FOR XML with an example.
Explain the RAW mode of FOR XML with an example.
Explain the AUTO mode of FOR XML with an example.
Explain the EXPLICIT mode of FOR XML with an example..............



Write your comment - Share Knowledge and Experience


 

 
Latest placement tests
Latest links
 
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring