Okay, so we currently have these employees right here in our database. Let's say that, for some reason, we want to delete all the employees that have a salary that is greater than $50,000 from this table, so that would be Emily, David's right here with a salary of 59,000. And also jet though with a salary of 55,000. In order to do that, SQL provides us with the delete from command. So we have delete from my staff, the name of the schema dot employees, the name of the table, and of the condition where salary, the name of the column right here is greater than $50,000. And of course, at the end, we must enter the semi colon.
Okay, now let's go back into the Python interpreter, and let's establish a new connection. To our database. Okay, now let's initialize the cursor. And finally, let's use the execute method on this cursor. So cursor, dot execute. And in between the parentheses of execute in between double quotes, we again copy and paste in this command.
Okay, let's hit enter. Now let's also commit our changes. So connection, dot commit, and connection dot close. And at this point, we should have three employees left in the table. So let's check this. And indeed We do.
The employees having salaries greater than $50,000 were deleted from the table. I'll see you in the next lecture where we are going to start querying our database using various conditions. And I think this is going to be pretty interesting. So I'll see you soon.