C++中SQL语句创建表时自增长字段总是出错SQL codecreate table t_Section (IDint IDENTITY (1,1) PRIMARY
C++中SQL语句创建表时自增长字段总是出错
- SQL code
create table t_Section ( ID int IDENTITY (1,1) PRIMARY KEY, index int ,section_namex varchar(50), still_water_bending_moment varchar(50) , frameworktype int , depth_neutral_axis Double , Vertical_inertia Double , Level_inertia Double , moment_above_shaft Double , deck_section_modulus Double , Keel_section_modulus Double , SectionPosition Double null)
[解决办法]
SQL server的话应该这样
create table t_Section (
ID int IDENTITY (1,1) PRIMARY KEY,
[index] int ,
section_namex varchar(50),
still_water_bending_moment varchar(50) ,
frameworktype int ,
depth_neutral_axis float ,
Vertical_inertia float ,
Level_inertia float ,
moment_above_shaft float ,
deck_section_modulus float ,
Keel_section_modulus float ,
SectionPosition float null)
