INSERT INTO product (pname,currency,other,fields) VALUES ('aNewProduct',(SELECT STATEMENT FOR OTHER VALUES)
这是可能的,我试图搜索,但他们都给我像
INSERT INTO product (pname,currency,other,fields) VALUES (SELECT STATEMENT FOR ALL VALUES)
但我只需要SELECT中的特定列和使用普通格式的预填充列。这将如何实现?
答案 0 :(得分:3)
你会这样做:
INSERT INTO
product (pname,currency,other,fields)
(Select 'aNewProduct', currency, other fields... From Tablex where blah)