spazworm
3/13/2015 - 4:22 AM

Table Creation in Derby including primary key, auto increment and current timespamp

Table Creation in Derby including primary key, auto increment and current timespamp

CREATE TABLE Contacts
(
id INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 0, INCREMENT BY 1),
firstname VARCHAR(30),
lastname VARCHAR(30),
telephone VARCHAR(15),
email VARCHAR(30),
created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT primary_key PRIMARY KEY (id)
) ;