0% found this document useful (0 votes)
4 views1 page

Java Database Employee Records Setup

This document creates a database and table called kelas_java and employees, then inserts 5 records into the employees table with details like name, gender, position and salary.

Uploaded by

ignatius lorenzo
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Java Database Employee Records Setup

This document creates a database and table called kelas_java and employees, then inserts 5 records into the employees table with details like name, gender, position and salary.

Uploaded by

ignatius lorenzo
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

CREATE DATABASE kelas_java;

CREATE TABLE employees (


id INT NOT NULL AUTO_INCREMENT,
fullname CHAR(30) NOT NULL,
gender CHAR(6) NOT NULL,
position VANCHAR (25) NOT NULL,
salary INT(10) NOT NULL,
PRIMARY KEY (id)
)
INSERT INTO employees (id, fullname, gender, position ,salary) VALUES ('001',
'Lux', 'Female', 'Director', '4500');
INSERT INTO employees (id, fullname, gender, position ,salary) VALUES ('002',
'Boy', 'Male', 'Operation Manager', '3500');
INSERT INTO employees (id, fullname, gender, position ,salary) VALUES ('003',
'Graven', 'Male', 'Finance Manager', '3500');
INSERT INTO employees (id, fullname, gender, position ,salary) VALUES ('004',
'Kai', 'Male', 'Staff', '2000');
INSERT INTO employees (id, fullname, gender, position ,salary) VALUES ('004',
'Anna', 'Female', 'Staff', '2000');

You might also like