By 28/04/2016

Sql Server Data Type For Storing Price Values

  • In most cases you want to storingĀ a value which represents a price, amount or money in Microsoft Sql Server.
  • Sql Server database offers different data types for storing money/price type data such as money, smallmoney, numeric(p,s) and decimal(p,s). But at this point it is important to decide that which data type is best for storing money/price type values.
  • Always useĀ decimal(19,2) type for storing money/price type values in Sql Server database. Many software developers including me recommended this type.
  • When you use decimal(19,2) type then you should decide the total number of decimals to use by visiting List Of World Currency Formats.

Example:

create table school_fee
( 
  id int,
  fee decimal(19,2)
);






Posted in: Solutions, Sql

Comments are closed.

Have a natural attraction for women cosmetics and replica watches uk clothes, no
more than two for men the most attractive one, is to make their own driving experience, happy and can serve as the facade of the car, another is to highlight the taste edify sentiment rolex replica watch. The replica rolex is undoubtedly the most fashionable accessories, wear a suit to attend the activities, but also get a decent match on the replica watches .