| |

VerySource

 Forgot password?
 Register
Search
View: 1866|Reply: 11

Here again, ask: The length of the Decimal data type Thank you

[Copy link]

3

Threads

10

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-2-21 23:00:01
| Show all posts |Read mode
I created a table in Enterprise Manager. One field is Decimal, and the length is 13 decimal places.
But the default length in Enterprise Manager is 9
Seek a solution
Either build it with a statement or it can be built in Enterprise Manager 管理 Thank you
Reply

Use magic Report

0

Threads

66

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-5-2 20:30:01
| Show all posts
Use numeric type
Reply

Use magic Report

0

Threads

66

Posts

27.00

Credits

Newbie

Rank: 1

Credits
27.00

 China

Post time: 2020-5-2 21:00:01
| Show all posts
numeric (13,6)
Reply

Use magic Report

0

Threads

100

Posts

53.00

Credits

Newbie

Rank: 1

Credits
53.00

 China

Post time: 2020-5-2 21:30:01
| Show all posts
create table test1 (field1 decimal (13,6));
Reply

Use magic Report

3

Threads

10

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-5-2 22:30:01
| Show all posts
It seems that the type cannot be changed is the task assigned above
Reply

Use magic Report

0

Threads

49

Posts

35.00

Credits

Newbie

Rank: 1

Credits
35.00

 China

Post time: 2020-5-2 23:45:01
| Show all posts
The length cannot be changed
The length of the decimal data type depends on the precision of the column

Modify the precision in the column's property page
Reply

Use magic Report

0

Threads

211

Posts

108.00

Credits

Newbie

Rank: 1

Credits
108.00

 China

Post time: 2020-5-3 10:00:01
| Show all posts
create table T (col decimal (13, 9))

drop table T

--OK
Reply

Use magic Report

3

Threads

10

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-5-3 12:30:02
| Show all posts
Thanks
My complete table
zz (table)
A varchar (8)
B varchar (4)
c decimal (13,6)
d date (8) requires A and B to be the joint primary key seek a solution thank you (write a complete thank you with SQL statement)
Reply

Use magic Report

0

Threads

211

Posts

108.00

Credits

Newbie

Rank: 1

Credits
108.00

 China

Post time: 2020-5-3 19:45:01
| Show all posts
create table zz (
A varchar (8) not null,
B varchar (4) not null,
c decimal (13,6) null,
d datetime null,
constraint PK_zz primary key (A, B)
)
Reply

Use magic Report

0

Threads

211

Posts

108.00

Credits

Newbie

Rank: 1

Credits
108.00

 China

Post time: 2020-5-3 21:30:02
| Show all posts
sp_pkeys 'zz'
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list