Created
May 7, 2016 14:03
-
-
Save bytestree/220c49e3628ea409e8fb95d98c6add4c to your computer and use it in GitHub Desktop.
Generic DAO in Hibernate initialize data script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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