I have an SQL statement without a where clause because I want it to affect all rows. I have a column with the name url. Now I want to change the current column url to something else. I want to concatenate something to the current url.
My statement is:
UPDATE tablename SET url = 'http' || url;
This is in a sql file, which executes and throws no errors but the database is not changing.
Can anyone help?
RDBMS is MySQL
Depending on your engine (in case it isn't Oracle and you have some bizarre MySQL bitwise operator)
UPDATE tablename SET url = CONCAT('http', url);
or
UPDATE tablename SET url = 'http' + url;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With