-
sql course
when I am follow the instruction to delete a single data from my database that I have create. It delete all of my database.
I am typing the sql string correctly but it keep deleting all of my data from my table.
I have went through the tutorial twice and when I get to the delete part I am having trouble.
delete
from myemployees_ts0211
where lastname =
'Weber-Williams';
this is the code I am using.
-
What is in the myemployees_ts0211 table?. Are all records with same lastname -weber-williams'?
-
There was only one record with lastname Webser-willaims.
-
What do you see in the records affect message? It does not make sense that it is deleting everything in the table.
Can you try moving the name string to the same line as the comparison column
delete
from myemployees_ts0211
where lastname = 'Weber-Williams';
-
yeah it doesn't make sense but believe me it does. I created a database and it delete it. I create a next database and the same thing happen again. Maybe there is a bug somewhere?
-
Can you delete by ID just to see if that acts differently?
delete
from myemployees_ts0211
where id = 123