Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9223575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:06:28+00:00 2026-06-18T04:06:28+00:00

In this table I want to insert values in the weight column that is

  • 0

In this table I want to insert values in the weight column that is of float type with decimal
values 00 like 100.00, 150.00, 25.00 .

In this table if I am going to insert 25.5 then it will show decimal value bit if I am storing 135.00 it will store 135 only not showing decimal if 00.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T04:06:29+00:00Added an answer on June 18, 2026 at 4:06 am

    I’m not sure from your question what you are actually looking for. Storage and Display are two separate things.

    STORAGE

    If you want to store a number with a fixed precision in SQL SERVER use DECIMAL

    CREATE TABLE MyTable
    (
        MyNumber DECIMAL(5,2)
    )
    

    The above will store 5 digits, 3 before the decimal point, and two after.

    Here’s the documentation: http://msdn.microsoft.com/en-gb/library/ms187746.aspx

    If you are storing currency values, then there is the MONEY datatype too: http://msdn.microsoft.com/en-us/library/ms179882.aspx

    DISPLAY

    If you are more interested in the display of values rather than the storage (You’ve already mentioned they are floats in the database) then in your C# application you can use something like this:

     string display = string.Format("{0:0.00}", myNumber);
    

    Here’s the documentation for custom formatting of numbers into strings: http://msdn.microsoft.com/en-gb/library/0c899ak8.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to insert values to my database table made in ms access. This
I want to insert values that are stored in a dictionary into a table.
I have a table and want to insert the current values of records that
i want to insert values into a table, with an INSERT INTO statement but
Suppose I have a MySQL table called MyTable, that looks like this: +----+------+-------+ |
I have a MySQL Table that looks like this: The SQL to create the
I want to insert the values like location name, latitude, longitude into azure tables
CREATE TYPE artist_table_type AS TABLE OF REF artist_type; / INSERT INTO track_table VALUES (
I want to insert some values into an SQLite table. The query is: insert
I want to insert some values to a table (item1) from a table (item2)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.