为什么这些sql语句不能一起工作,但是当我分别执行它们时却可以工作?

时间:2019-11-24 02:50:44

标签: mysql sql

CREATE TABLE test_table(id int not null auto_increment PRIMARY KEY, year int, quarter varchar(2), month varchar(3), week int, fiscal_month int, fiscal_week int, bsv int, prod_bsv varchar(50), comp_name_as_is varchar(30), mfg varchar(10), eb varchar(100), invoice_so varchar(50), invoice_no varchar(50), mpn varchar(255), customer_bill_to_name varchar(255), nsb double, rgp double, pre_rgp double, cust_invoice double, invoice_bill_bgp double,invoice_bill_pgp int)

INSERT INTO test_table(year, quarter, month, week, fiscal_month, fiscal_week, bsv, prod_bsv, comp_name_as_is, mfg, eb, invoice_so, invoice_no, mpn, customer_bill_to_name, nsb, rgp, pre_rgp, cust_invoice, invoice_bill_bgp, invoice_bill_pgp)
VALUES (1,  'Q3',   'x',    1,  7,  1,  1,  'x',    'x',    'x',    'x',    'x',    'x',    'x',    ”x”,    1,  1,  1,  1,  1,  1)

1 个答案:

答案 0 :(得分:0)

您是否尝试过在第一个语句之后加上分号?如果它们分开工作但不能一起工作,则可能是缺少分隔符。