Start Sql queries for updating a column

Sql queries for updating a column

” by Markus Winand is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License.

Is there way valid way to do this as a verbose select query like I attempted or maybe a simpler way for someone newer to SQL that uses multiple Alter/Update/Select commands?

Single quotes are for string literals, you can't use them for identifier names, such as column aliases.

If the object being updated appears more than one time in the FROM clause, one, and only one, reference to the object must not specify a table alias. Avoid using these hints in this context in new development work, and plan to modify applications that currently use them.

I currently have a column "Description" which has a zip-code in it in Table 'Client'.

Koen Sorry forgot to say the Description column also has additional data after the City so cannot just bring in the City and Zip-code from another table.

Many thanks Sergiy If I run the SET command I get an "incorrect Syntax near '=' " message.

Compound assignment operator: = Add and assign -= Subtract and assign *= Multiply and assign /= Divide and assign %= Modulo and assign &= Bitwise AND and assign ^= Bitwise XOR and assign |= Bitwise OR and assign Returns updated data or expressions based on it as part of the UPDATE operation. Table1 (c1 int PRIMARY KEY NOT NULL, c2 int NOT NULL); GO CREATE TABLE dbo. Table2 WHERE CURRENT OF abc; GO SELECT c1, c2 FROM dbo.