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_TEST_TABLE; CREATE TABLE EMP_TEST_TABLE ( EMPNO NUMBER DEFAULT EMPLOYEE_S.NEXTVAL PRIMARY KEY, EMPNAME VARCHAR2(20), DEPNO NUMBER, CONSTRAINT EMP_FK_T FOREIGN KEY (DEPNO) REFERENCES DEPT_TEST_S(DEPNO)); --INSERTING

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear