How to insert same records for multiple times in Oracle.

How to insert same records for multiple times in Oracle.

BEGIN
  FOR 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

Popular posts from this blog

General information about Netezza : Default Error details

Minus in Teradata?...