sybse数据库将查询结果保存在新建表报错 Incorrect syntax near the keyword 'as'?
createtabledj_tmpasselect*fromV_ACCOUNT00wherebalance>0andaccountstatus='01'...
create table dj_tmp as select * from V_ACCOUNT00 where balance >0 and accountstatus = '01'
展开
1个回答
展开全部
你的sql2有问题(字段数据类型,你自已注意一下。如果有数值型的,就要用'小分号) :
改成以下的试试:
sql2 = "insert into Person ( name,sex,place,level,specialty,work,department,busi";
sql3 = " values('" + textBox1.Text.ToString() + "','" + textBox2.Text.ToString() + "','" + comboBox1.Text.
ToString() + "','" + textBox3.Text.ToString() + "','" + textBox5.Text.
ToString() + "','" + textBox6.Text.ToString() + "','" + textBox7.Text.ToString() + "','" + textBox8.Text.
ToString() + "','" + textBox9.Text.ToString() + "'"
另外那个ID,在数据库中要改为自动增加。
改成以下的试试:
sql2 = "insert into Person ( name,sex,place,level,specialty,work,department,busi";
sql3 = " values('" + textBox1.Text.ToString() + "','" + textBox2.Text.ToString() + "','" + comboBox1.Text.
ToString() + "','" + textBox3.Text.ToString() + "','" + textBox5.Text.
ToString() + "','" + textBox6.Text.ToString() + "','" + textBox7.Text.ToString() + "','" + textBox8.Text.
ToString() + "','" + textBox9.Text.ToString() + "'"
另外那个ID,在数据库中要改为自动增加。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询