You are on page 1of 1

Create Table Departemen(KD_Dept INTEGER,

KD_Departemen CHAR(30),Nama_Dept Char(15), PRIMARY KEY(KD_departemen));


sik tabel prtama sukses
create table karyawan(
info_karyawan INTEGER,
NIP CHAR(15),
Nama_Karyawan CHAR(35),
TGL_Lahir CHAR(15),
Alamat CHAR(20),
Kota CHAR(20),
No_Telp CHAR(20),
Kd_Dept CHAR(1)
PRIMARY KEY(NIP),
FOREIGN KEY(KD_Dept) references Departemen(KD_Dept));
sik ke 2 error,.
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near '(NIP)
,
FOREIGN KEY(KD_departemen) references Departemen(KD_Dept))' at line 10
mysql>

You might also like