Forum > Databases
[SOLVED] Relational database
Pe3s:
Hello I have this question, I have a SQLite relational database with two tables. A one-to-many relationship. If I delete a record from Table 1 it does not delete records in Table 2. How can I delete the record from table 1 and all records related to the record in table 2 ?
Greetings
Thaddy:
DELETE <X> FROM <Y> JOIN X1 WHERE <value> or similar. (or a double select)
But in a.o Sqlite you can use:
https://www.techonthenet.com/sqlite/foreign_keys/foreign_delete.php
paweld:
Foregin Keys: https://www.sqlite.org/foreignkeys.html
Thaddy:
posts crossed
Pe3s:
Thank you :)
Navigation
[0] Message Index
[#] Next page