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.
| Author |
Topic |
|
JJins
Yak Posting Veteran
81 Posts |
Posted - 2010-11-10 : 11:01:09
|
| Can anyone define what the different Datatypes are....example bit= true or fals, timestamp = date and time of present day. Then I also a question regarding primary and seconday keys.when building the tables you should not allow nulls for the primary key......(yes/NO?) Should you for foriegn keys?what are the results or future problems you will find yourself in if you do or dont allow nulls?Thanks as always!best,GG |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-11-10 : 11:08:25
|
| primary key doesnt allow null valuesBut you can have Nulls in column having foreign key constraint------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2010-11-10 : 12:13:17
|
quote: Originally posted by JJins timestamp = date and time of present day.
Be careful with TIMESTAMP. This is a special datatype/column and is NOT a date but a VARBIANRY data type. And I believe that TIMESTAMP is deprecated and the new nomenclature is ROWVERSION.From Books Online:quote: (Rowversion) Is a data type that exposes automatically generated, unique binary numbers within a database. rowversion is generally used as a mechanism for version-stamping table rows. The storage size is 8 bytes. The rowversion data type is just an incrementing number and does not preserve a date or a time.
|
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2010-11-10 : 12:36:27
|
quote: Originally posted by JJins Can anyone define what the different Datatypes are
See here |
 |
|
|
|
|
|