例:"create table name(瞬时热量(GJ/h) char(10))"; 报错!
"create table name(瞬时热量 char(10))";正常!
我想让字段中带()和/,请问应该怎样处理?
我看网上有"create table name([瞬时热量(GJ/h)] char(10))"和
"create table name('瞬时热量(GJ/h)' char(10))"的处理方式,我试过都不行。
多提一句,我是用c#操作的mysql
原句:string con = "create table name(瞬时热量(GJ/h) char(10))";
改成这样吧,字段名不是用引号的:create table name(瞬时热量(GJ/h)
char(10) ); 那个符号显示不出来就截图了
create table name("瞬时热量(GJ/h)" char(10)) 加个双引号就可以了。或者转义( )