私は現在、主外部キー関係のテーブルを作成しています....
book table
bookid bookname author
0 No book no author
1 Engg Maths Greiwal
2 Java Basics James Gosling
3 Mahabharata Ved Vyasa
4 Ramayana Valmiki
5 Harry Potter JK Rowling
usertable
userid name bookid
1 Arjun 2
2 Charles 2
3 Babbage 3
ここで bookid は usertable の外部キーで、booktable の主キーです..... カスケード、 setnull 、 restrict 、アクション制約なしについて聞いたことがあります....
usertableの列bookidのデフォルト値として0が設定されています.....
Now i want a situation when a bookid(primary) entry is deleted from the main table i.e booktable, the entires containing bookid in the user table should be updated to the default value ( i.e here 0 ).....
何か方法はありますか...???
私が言えることは、私がphpmyadmin mysql innodbに取り組んでいるということだけです......