top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is the difference between CAST and CONVERT in sql server?

+3 votes
505 views
What is the difference between CAST and CONVERT in sql server?
posted Apr 28, 2014 by Muskan

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer

CONVERT is SQL Server specific, CAST is ANSI.

CONVERT is more flexible in that you can format dates etc. Other than that, they are pretty much the same. If you don't care about the extended features, use CAST.

Check http://msdn.microsoft.com/en-us/library/ms187928.aspx for more detail on specifics

answer Apr 28, 2014 by Salil Agrawal
Similar Questions
0 votes

what is the difference between char , varchar and nvarchar in sql?

+3 votes

How to convert c # inline queries into stored procedure written in transact sql?

...