-3

is following sql valid ?

UPDATE suppliers, contacts
SET suppliers.status = 'Active',
    contacts.note = 'Also Supplier'
WHERE suppliers.supplier_id = contacts.contact_id;

but oracle is not supporting. why?

How to update two tables in one statement in SQL Server 2005?

Community
  • 1
  • 1
Nishantha
  • 87
  • 1
  • 8
  • 3
    This is not valid sql. – Siyual Jun 03 '14 at 15:04
  • http://www.techonthenet.com/sql/update.php please refer this reference EXAMPLE - UPDATE MULTIPLE TABLES – Nishantha Jun 03 '14 at 15:06
  • 2
    That link is plain wrong. The statement is **not** valid (standard) SQL. –  Jun 03 '14 at 15:06
  • Absolutely, Link is surely not correct. You can't update multiple table same time. – Rahul Jun 03 '14 at 15:08
  • copy content from that site: EXAMPLE - UPDATE MULTIPLE TABLES Let's look at an UPDATE example that shows how to update multiple tables in an UPDATE statement. Please note that this syntax is not valid in Oracle). – Nishantha Jun 03 '14 at 15:09
  • Are you sure about that statement? – Nishantha Jun 03 '14 at 15:11
  • http://stackoverflow.com/questions/15115759/update-multiple-tables-in-sql-server-using-inner-join – Nishantha Jun 03 '14 at 15:13
  • 3
    Your query uses a highly non-standard extension of SQL that I believe is only supported by MySQL. So, in a sense, Oracle does support it (the Oracle Corporation owns MySQL). – Gordon Linoff Jun 03 '14 at 15:13
  • 2
    Did you read any of the answers to the SO posts you've linked? Both of them clearly say `You can't update multiple tables in one statement` – Siyual Jun 03 '14 at 15:14
  • I think it is a valid question since Oracle supports [Multitable Inserts](http://docs.oracle.com/cd/E16655_01/server.121/e17209/statements_9014.htm#SQLRF55089) – Wernfried Domscheit Jun 03 '14 at 20:31

1 Answers1

1

No, the sql supplied is NOT valid.

As others have stated in the comments, the link you supplied is a question about if you can update multiple tables in a single statement in SQL Server.
The answer to that question is also No

Andrew Bickerton
  • 468
  • 4
  • 14