This blog is intended to provide frequently asked interview questions and answers.
Difference between DATEPART and DATENAME
DatePart(DatePart, Date) - Returns an integer representing the specified DatePart. This function is simialar to DateName(). DateName() returns nvarchar, where as DatePart() returns an integer.
Example:
Select DATEPART(weekday, '2012-08-30 19:45:31.793') -- returns 5
Select DATENAME(weekday, '2012-08-30 19:45:31.793') -- returns Thursday
Subscribe to:
Post Comments (Atom)
What is Normalization?
Database normalization is a data design and organization process applied to data structures based on rules that help building relational dat...
No comments:
Post a Comment