I don't know SQL, and I'm having trouble finding an example for what I need to do.
I have a table which I want to delete from, in the case that an entry's isGuest
column is 1
. I then delete from other tables which referenced that entry.
As a C++ developer, I basically want to do an if check to see if a given account (selected with an accountID
) has an isGuest
of 0
, and return from the function if so (skipping the deletes).
If I try this, I get an
invalid column name 'isGuest'
error. I know that the table and column names are correct, so I'm at a loss. I'm getting worried that SQL can't actually do what I want to do here based on some confusing forum posts I've seen already.