| |

VerySource

 Forgot password?
 Register
Search
View: 825|Reply: 3

SQL create data table Create Table --- decimal point problem

[Copy link]

2

Threads

5

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-4 11:10:01
| Show all posts |Read mode
I now have a statement that creates data with VB:
   cmd.CommandText = "CREATE TABLE line (id char (10), X1 float, Y1 float, X2 float, Y2 float);"
   cmd.Execute
In the design view of Access, you can see that the ID is a character type, the ID field length is 10, X1, etc., the field size is double precision, and the number of decimal places is automatic.

I would like to ask you heroes, how can float be changed to get 2 decimal places?
I used the method of Number (10,2) and it didn't pass.
Reply

Use magic Report

2

Threads

5

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

 Author| Post time: 2020-1-8 07:54:01
| Show all posts
This question is relatively simple, but I haven't done it before, I don't know where to find information, please heroes to help.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-10 19:00:02
| Show all posts
You first manually create a table in the database, and then export the script from SQL to see
Understand
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-4 16:30:01
| Show all posts
Is getting SQL top, the same problem
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