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

New Text Document

Uploaded by

yutdfgvbchgfg
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)
9 views1 page

New Text Document

Uploaded by

yutdfgvbchgfg
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
You are on page 1/ 1

SELECT * FROM `movie` INNER JOIN pelanggan

ON movie.id_pelanggan=pelanggan.id_pelanggan;

CONSTRAINT id_pembeli FOREIGN KEY (id_pembeli) REFERENCES pembeli (id_pembeli)

update
try {
st = cn.createStatement();
st.executeUpdate ("UPDATE siswa set"
+ "nis='" + inputNIS.getText() + "', "
+ "nama='" + inputNama.getText() + "', "
+ "jurusan='" + inputJurusan.getSelectedItem() + "', "
+ "jk='" + inputJK.getSelectedItem() + "',"
+ "alamat='" + inputAlamat.getText() + "'");
tampilData("");
JOptionPane.showMessageDialog(null, "Update Berhasil");
reset();
} catch (Exception e) {
e.printStackTrace();
}

hapus:

try{
int jawab;

if ((jawab = JOptionPane.showConfirmDialog(null, "Ingin menghapus data?",


"konfirmasi", JOptionPane.YES_NO_OPTION)) == 0) {
st = cn.createStatement();
st.executeUpdate("DELETE FROM siswa WHERE nis='"
+ tabModel.getValueAt(tableSiswa.getSelectedRow(), 0) + "'");
tampilData("");
reset();
}
}catch (Exception e) {
e.printStackTrace();
}

You might also like