Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 datatype for money

Author  Topic 

lyealain
Starting Member

4 Posts

Posted - 2008-11-01 : 06:11:35
may i know what is the best datatype to declare for my business transaction id if the maximun record can go up to only 5000 record?

should i use int ?? or tinyint? is MsSql support tinyint??

what is the different between varchar and nchar?


lyealain hong loon

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-01 : 07:05:25
you can use smallint. see the ranges of int,tinyint & smallint here

http://doc.ddart.net/mssql/sql70/ia-iz_29.htm

varchar is variable character. it will store variable number of characters in it upto maxlength that we define. a field varchar(10) can store upto 10 characters.
nchar is unicode character. it can store other language characters also. each character takes double the storage space of original character.

http://doc.ddart.net/mssql/sql70/ca-co_3.htm

http://doc.ddart.net/mssql/sql70/na-nop_1.htm
Go to Top of Page
   

- Advertisement -