genrows.sql

--==================================================================
--
-- Title       :   genrows.sql
-- Description :   Script to populate a table with requested
--                 number of rows.
--
-- Usage/Notes :   Extremely high values can use up large amounts
--                 of memory.
--
-- Copyright   :   ABCdba.com 2010
--
--==================================================================
 
ACCEPT tabname PROMPT 'Enter table name:               ';
ACCEPT genrows PROMPT 'Enter no. of rows to generate:  ';
 
CREATE TABLE &tabname
( COL1 VARCHAR2(1000) )
TABLESPACE USERS
/
 
INSERT INTO &tabname
( SELECT LEVEL FROM DUAL CONNECT BY LEVEL < (&genrows + 1) )
/
 
COMMIT
/
 
SELECT COUNT(*) FROM &tabname
/

© copyright 2001-2014 ABCdba.com | all rights reserved