CREATE DATABASE PERSONAL_METRIC ON
(NAME=PERSONAL_METRIC_DAT,
FILENAME="D:\Datas\SQLSERVER\PERSONAL_METRIC.MDF",
SIZE=12,
MAXSIZE=100,
FILEGROWTH=2)
LOG ON
(NAME="CPERSONAL_METRIC_LOG",
FILENAME="D:\Datas\SQLSERVER\PERSONAL_METRIC.LDF",
SIZE=4MB,
MAXSIZE=50MB,
FILEGROWTH=2MB
)
CREATE TABLE KARYAWAN
(
NIP CHAR(4) PRIMARY KEY,
NAMA CHAR(30) NOT NULL,
KODESTATUS TINYINT,
KODEDIVISI CHAR(1) CONSTRAINT
CEKDIVISI CHECK
(KODEDIVISI IN('A','B','C','D','E','F')),
TGL_LAHIR DATETIME,
GOLONGAN CHAR(2) constraint
CEKGOL CHECK
(GOLONGAN IN('A','B','C','D','E','F','G','H','I')),
SEX TINYINT CONSTRAINT
CEKSEX CHECK
(SEX IN(1,2,3,4)),
KOTA_LAHIR VARCHAR(30),
ALAMTA VARCHAR(90),
KOTA_ALM VARCHAR(25),
TELEPON CHAR(13),
ANAK TINYINT
)
SELECT * FROM KARYAWAN
INSERT INTO KARYAWAN VALUES(0011,'UDIN SYAMSUDIN','2','A',23/05/1973,'B',1,'JALARTA','JL.KEMANGGISAN I NO.21','JAKARTA BARAT',021-5676666,1)
INSERT INTO KARYAWAN VALUES(0012,'HAMDI SUCIPTO',3,'C',13/12/1976,'B',1,'JAKARTA','JL.KEBUN PALA 2 NO.1','JAKARTA TIMUR',0217876666,3)
INSERT INTO KARYAWAN VALUES(0013,'ASTARI NOVITA',1,'D',12/02
/1967,'A',2,'SEMARANG','JL.AHMAD YANI NO.6','JAKARTA PUSAT',021-3212222,0)
INSERT INTO KARYAWAN VALUES(0014,'DEWI RESTUTI',2,'D',31/12/1977,'A',1,'BANDUNG','JL.KEBON KACANG I NO.3','JAKARTA PUSAT',021-3231111,0)
INSERT INTO KARYAWAN VALUES(0015,'NILO LEGOWO',1,'A',11/02/1965,'B',1,'JAKARTA','JL.MAKMUR I NO.12','JAKARTA SELATAN',021-7656777,0)
INSERT INTO KARYAWAN VALUES(0016,'M.TYAS ANANTO',1,'C',23/12/1965,'A',1,'SEMARANG','JL.KEBAYORAN LAMA I NO.1','JAKARTA SELATAN',021-7672122,0)
INSERT INTO KARYAWAN VALUES(0017,'HARYANTI',1,'B',12/11/1967,'C',2,'JAKARTA','JL.PERMATA HIJAU V NO.2','JAKARTA SELATAN',021-7879899,0)
INSERT INTO KARYAWAN VALUES(0018,'SITI AMINAH',2,'B',12/09/1970,'C',2,'JAKARTA','JL.PESING KONENG NO.1','JAKARTA BARAT',021-6567888,2)
INSERT INTO KARYAWAN VALUES(0019,'SRI JUHAERIYAH',2,'E',09/07/1978,'D',2,'BANDUNG','JL.CILINCING RAYA NO.22','JAKARTA UTARA',021-5456766,1)
INSERT INTO KARYAWAN VALUES(0020,'RINI HAPSARI',2,'E',01/11/1979,'D',2,'BANDUNG','JL.KEMANG RAYA NO.7','JAKARTA SELATAN',021-7567811,4)
INSERT INTO KARYAWAN VALUES(0021,'UMI ZALFAUZIAH',2,'E',01/11/1974,'C',2,'SEMARANG','JL.KAPUK MUARA I NO.9','JAKARTA BARAT',021-6567890,1)
INSERT INTO KARYAWAN VALUES(0022,'RIFAT SAPTONO',2,'C',12/09/1978,'A',1,'BANDUNG','JL.KELAPA GADING NO.3','JAKARTA TIMUR',021-7878888,3)
INSERT INTO KARYAWAN VALUES(0023,'SONDANG SIBUEA',2,'A',12/06/1967,'D',1,'MEDAN','JL.KALIMALANG I NO.1','JAKARTA TIMUR',021-7878781,2)
INSERT INTO KARYAWAN VALUES(0024,'AL ROZAQ',2,'D',09/01/1976,'C',1,'BOGOR','JL.PAMULANG II NO.6','TANGERANG',021-7878123,3)
INSERT INTO KARYAWAN VALUES(0025,'TRI WIYATI',4,'H',11/11/68,'F',3,'SEMARANG','JL.PANGERAN KUDA NO.2','BOGOR',021-876123,2)