更新时间:2022-12-12 12:00:45
如果img1
和img2
是必填字段,请在这些字段中添加任何内容.
Ifimg1
andimg2
are required fields, add anything to these fields.
INSERT INTO product1 (pname, qty, pdesc, img1, img2)
SELECT pname, qty, pdesc, 0 AS img1, 0 AS img2
FROM product
如果接受可为空的值,请尝试以下查询:
If nullable values are accepted, try this query:
INSERT INTO product1 (pname, qty, pdesc, img1, img2)
SELECT pname, qty, pdesc, NULL AS img1, NULL AS img2
FROM product
查询看起来正确-检查列的类型.
The query looks correct - check the types of the columns.