Set Dua Primary Key di Tabel SQL Server

Cukup simple caranya, buat dulu tabel dan fieldnya lalu simpan tanpa set primary key terlebih dahulu.
Setelah itu ketik query dibawah ini :

ALTER TABLE table_name

ADD PRIMARY KEY (id, kode);

Keterangan : menambahkan primary key field id dan kode.

Sekian.
Terima Kasih.

This entry was posted in Database and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *