TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Convert decimal values in SQL Server
Venkatesan Jayakantham
Jun 02, 2010
4.6
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
Convert decimal values in SQL Server
Convert a integer value with multiple decimals to fixed number of decimals(2 decimals):
Consider a scenario, am having a decimal data and I need to restrict the decimal values. In this case, we need to use convert operator.
create table aa(id decimal(10,5))
insert into aa values(1.90955)
select convert(decimal(10,2),id) from aa
Cheers,
Venkatesan Prabu .J
http://venkattechnicalblog.blogspot.com/
Convert decimal values in SQL Server
Next Recommended Reading
Converting Numbers To Words - Adding Decimal Support