CREATE TABLE departments ( ID NUMBER(10) NOT NULL, DESCRIPTION VARCHAR2(50) NOT NULL); ALTER TABLE departments ADD ( CONSTRAINT dept_pk PRIMARY KEY (ID)); CREATE SEQUENCE dept_seq START WITH 1;
Here is what the above code is Doing:
1. Create a table called departments.
2. Add a primary key constraint to the table.
3. Create a sequence called dept_seq.