Oracle
 sql >> Teknologi Basis Data >  >> RDS >> Oracle

Tanda kurung kanan tidak ada:Saat Hapus Tetapkan Null Saat Perbarui Cascade (SQL/Oracle)

Pada Pembaruan Kaskade tidak dimungkinkan di Oracle. Tom Kite berkata :

There is not "on update cascade" automagically.

There are ways to do it, 

o deferrable constraints.  defer the foreign key check until commit, update the parent, 
update the child and then commit.

Personally -- I've never found a need or use for update cascade.  I'm opposed to it.  If 
your design requires it -- change your design now if you can.  


Primary keys are supposed to be imutable, never changing, constant.  It is an excessively 
bad practice to have to update them ever.  If there is a 0.00001% chance you will have to 
update a primary key -- then it is not a primary key, its a surrogate key and you need to 
find the true primary key (even if you have to make it up via a sequence) 

Periksa tautan ini




  1. Database
  2.   
  3. Mysql
  4.   
  5. Oracle
  6.   
  7. Sqlserver
  8.   
  9. PostgreSQL
  10.   
  11. Access
  12.   
  13. SQLite
  14.   
  15. MariaDB
  1. Pisahkan File Teks/CSV Besar menjadi Beberapa File di PL SQL

  2. Pilih string sebagai nomor di Oracle

  3. SQL trunc/grup/pesan berdasarkan tanggal (hari/bulan/kuartal/tahun) dengan jumlah lewati tanggal tanpa data

  4. Waktu pembukaan koneksi SQL yang sangat lama

  5. 7 Cara Memeriksa Versi Oracle Anda