July 16, 2008 at 8:36 am
Hi all,
I have to create a new field in a table, the length of the values will be 1.0.
I just used number(1.0) in oracle. Not sure what I can use in T sql.
I tried int(1.0) and smallint (1.0). It didnt work.
Thanks very much for your suggestions
July 16, 2008 at 10:16 am
You can use datatype 'numeric'
create table #Tmp (
Id [numeric](1, 0))
drop table #Tmp
By the way, this precision will not allow you to store any decimal part in the field.
[numeric](2, 1) will allow you to store maximum 1 digit decimal part and 1 digit integer part. Same is true with NUMBER(2, 1) in Oracle.
-----------------------------------------------------------[font=Arial Black]Time Is Money[/font][font=Arial Narrow]Calculating the Number of Business Hours Passed since a Point of Time[/url][/font][font=Arial Narrow]Calculating the Number of Business Hours Passed Between Two Points of Time[/font]
July 16, 2008 at 10:21 am
Thanks again!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy