Skip to content

Instantly share code, notes, and snippets.

@bytestree
Created May 7, 2016 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bytestree/220c49e3628ea409e8fb95d98c6add4c to your computer and use it in GitHub Desktop.
Save bytestree/220c49e3628ea409e8fb95d98c6add4c to your computer and use it in GitHub Desktop.
Generic DAO in Hibernate initialize data script
-- Create table --
CREATE TABLE employee
(
id bigserial NOT NULL,
firstname character varying(50),
lastname character varying(50),
designation character varying(50),
salary integer,
CONSTRAINT employee_pk PRIMARY KEY (id)
);
-- Insert Data ---
INSERT INTO employee(
firstname, lastname, designation, salary)
VALUES ('Employee1', 'Last1', 'Senior Developer', 1400);
INSERT INTO employee(
firstname, lastname, designation, salary)
VALUES ('Employee2', 'Last2', 'Developer', 1200);
INSERT INTO employee(
firstname, lastname, designation, salary)
VALUES ('Employee3', 'Last3', 'Senior Developer', 1500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment