How to insert same records for multiple times in Oracle.
How to insert same records for multiple times in Oracle.
BEGINFOR i IN 1..10 LOOP
INSERT INTO Product
(
Product_ID,Product_Name
)
SELECT max(Product_ID)+1, Product_Name
FROM Product where Product_ID in (select max(Product_ID) from Product)
GROUP BY Product_ID,Product_Name
END LOOP;
END;
Comments
Post a Comment