错误:“SET”处或附近的语法错误

时间:2011-08-26 09:11:52

标签: postgresql syntax-error sql

   UPDATE m_price
   SET pricelist=15.159, pricestd=14.3184
   WHERE m_product_id = 1000332

错误:“SET”或其附近的语法错误我在POSTGRESQL中收到此错误。

表格结构

CREATE TABLE m_price (
m_pricelist_version_id numeric(10,0) NOT NULL,
m_product_id numeric(10,0) NOT NULL,
ad_client_id numeric(10,0) NOT NULL,
ad_org_id numeric(10,0) NOT NULL,
isactive character(1) DEFAULT 'Y'::bpchar NOT NULL,
created timestamp without time zone DEFAULT now() NOT NULL,
createdby numeric(10,0) NOT NULL,
updated timestamp without time zone DEFAULT now() NOT NULL,
updatedby numeric(10,0) NOT NULL,
pricelist numeric DEFAULT 0 NOT NULL,
pricestd numeric DEFAULT 0 NOT NULL,
pricelimit numeric DEFAULT 0 NOT NULL,
CONSTRAINT m_productprice_isactive_check CHECK ((isactive = ANY (ARRAY['Y'::bpchar,  'N'::bpchar])))
       );

1 个答案:

答案 0 :(得分:1)

尝试

UPDATE m_price
SET (pricelist,pricestd)=(15.159,14.3184)
WHERE m_product_id = 1000332