-- CREATE TABLE
CREATE TABLE EMPLOYEE
(
ID NUMBER NOT NULL,
FIRST_NAME VARCHAR2(10 BYTE),
LAST_NAME VARCHAR2(10 BYTE)
);
-- INSERT SOME VALUES INTO TABLES
INSERT INTO EMPLOYEE (ID,FIRST_NAME,LAST_NAME) VALUES (1,'VARINDER','SANDHU');
INSERT INTO EMPLOYEE (ID,FIRST_NAME,LAST_NAME) VALUES (2,'DINESH','SHARMA');
INSERT INTO EMPLOYEE (ID,FIRST_NAME,LAST_NAME) VALUES (3,'RANJOYT','SINGH');
INSERT INTO EMPLOYEE (ID,FIRST_NAME,LAST_NAME) VALUES (4,'VIKRAM','SINGH');
-- CREATE A COPY OF EMPLOYEE TABLE WITH DATA
CREATE TABLE EMPLOYEE_COPY
AS
SELECT * FROM EMPLOYEE;
-- CHECK THE TABLE
SELECT * FROM EMPLOYEE_COPY;
-- CREATE A COPY OF EMPLOYEE TABLE WITHOUT DATA
CREATE TABLE EMPLOYEE_COPY1
AS
SELECT * FROM EMPLOYEE_COPY
WHERE 1 = 0;
Related