Reputation: 7588
I have a table with single column.
EmailTable
NotifyEmail |
---|
[email protected] |
No id
no nothing just single row single column. So how do I update this row with new value?
I tried:
UPDATE NotifyEmail
FROM EmailTable
SET [email protected]
It's not working.
edit, my table do not have ID. It's just a single column.
Upvotes: 2
Views: 683
Reputation: 5201
The MySQL UPDATE
statement has the following syntax:
UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;
so, in your case, you should write the following query:
UPDATE EmailTable
SET NotifyEmail = '[email protected]'
WHERE NotifyEmail = '[email protected]';
Upvotes: 3