How to write UPDATE SQL with Table alias in SQL Server 2008? -
i have basic update sql -
update hold_table q set q.title = 'test' q.id = 101;
this query runs fine in oracle, derby, my-sql - fails in sql server 2008 following error: "msg 102, level 15, state 1, line 1 incorrect syntax near 'q'."
if remove occurrences of alias, "q" sql works.
but need use alias.
the syntax using alias in update statement on sql server follows:
update q set q.title = 'test' hold_table q q.id = 101;
the alias should not necessary here though.
Comments
Post a Comment