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 2000 Forums
 SQL Server Development (2000)
 Data Type

Author  Topic 

mbevon
Starting Member

41 Posts

Posted - 2002-08-12 : 11:15:22


what data type should i assign for a YEAR field, in access i would've use text?


thanks
marlon

jasper_smith
SQL Server MVP & SQLTeam MVY

846 Posts

Posted - 2002-08-12 : 11:20:10
char(4) or int could be used if you only intend to store the year.
SQL has a datetime field used to store dates but if all you are storing is the year then the 2 options above would take up only half the space.


HTH
Jasper Smith
Go to Top of Page

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-08-12 : 11:27:08
SMALLINT would work as well....


Jay White
{0}
Go to Top of Page

jasper_smith
SQL Server MVP & SQLTeam MVY

846 Posts

Posted - 2002-08-12 : 11:55:10
even better - only 2 bytes


HTH
Jasper Smith
Go to Top of Page
   

- Advertisement -