Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Convert decimal values in SQL Server
WhatsApp
Venkatesan Jayakantham
14y
4.7
k
0
0
25
Blog
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
Up Next
Converting Numbers To Words - Adding Decimal Support
Ebook Download
View all
Printing in C# Made Easy
Read by 22.3k people
Download Now!
Learn
View all
Membership not found