SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
DROP SEQUENCE TEST_S; CREATE SEQUENCE TEST_S START WITH 1 INCREMENT BY 2; DROP SEQUENCE EMPLOYEE_S; CREATE SEQUENCE EMPLOYEE_S; DROP TABLE DEPT_TEST_S; CREATE TABLE DEPT_TEST_S ( DEPNO NUMBER DEFAULT TEST_S.NEXTVAL CONSTRAINT DE_PK PRIMARY KEY, DNAME VARCHAR2(100)); --CREATING EMP TABLE DROP TABLE EMP; CREATE TABLE EMP ( EMPNO NUMBER DEFAULT EMPLOYEE_S.NEXTVAL CONSTRAINT EMP_PK PRIMARY KEY, EMPNAME VARCHAR2(20), DEPNO NUMBER, CONSTRAINT EMP_FK FOREIGN KEY DEPNO REFERENCES DEPT_TEST_S(DEPNO)); --INSERTING

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear