User Tools

Site Tools


remove_volume_from_database

Remove Volume from Database

The databases are normalized and the schema is setup to do a CASCADE DELETE. So if you want to remove one volume completely, you only need to delete the row from the volumes table, and it will delete all the books, chapters, and verses with it.

For example, you only want to keep the New Testament:

DELETE FROM volumes WHERE volume_title != 'New Testament';

Or if you only want the Bible:

DELETE FROM volumes WHERE volume_title NOT IN ('Old Testament', 'New Testament');

You can verify the changes by looking at the number of scriptures in the verses table.

SELECT COUNT(1) FROM verses;
remove_volume_from_database.txt · Last modified: by steve

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki