SQL 101: Interacting with the Memories in your Pensieve

You can accomplish this with the following SQL query:This will delete all records from the convos_with_dark_wizards table where the convo_with value is Tom Riddle, excluding the record Dumbledore has asked to see (the != means not equal to).Adding Records to a Pensieve/DatabaseWhile you’re at it, you might as well paint yourself in the best possible light by adding in some new records to your convos_with_dark_wizards table..You need to show Dumbledore that you always prioritized being a responsible professor and mentor..You can insert new records into your database using the following SQL syntax:You’ll notice that we didn’t need to include the id field with the field names or the values to be inserted..This is because id is an auto-incremented primary key, which means that the pensieve/database will auto-magically assign an id value to all new records that are created.Now your convos_with_dark_wizards table looks like this:Success..Thanks to some very basic SQL, you can go down in history as having contributed nothing to Voldemort’s rise to power!. More details

Leave a Reply