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 |
|
ckuo@kahluadesigns.com
Yak Posting Veteran
58 Posts |
Posted - 2002-06-25 : 16:56:33
|
| Hi, When I create a table using T-SQL, what is the syntax to defining the Precision and Scale of a numeric/decimal datatype? All the SQL Server books I have doesnt seem to address this. Thanks |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-06-25 : 16:59:45
|
| That's interesting, it's pretty well documented in Books Online (and it's free!) It goes like this:CREATE TABLE myTable (numberCol numeric(5, 2))This creates a table with one column (numberCol) with a precision of 5 and a scale of 2. Precision is the total number of digits, scale is the number of decimal places. |
 |
|
|
ckuo@kahluadesigns.com
Yak Posting Veteran
58 Posts |
Posted - 2002-06-25 : 17:06:37
|
| Thanks,I'm dumb today, I was looking in the Creating a Table chapter of my SQL Server Unleased book, maybe its in another chapter. Thanks alot! |
 |
|
|
|
|
|