Updates and Conditions

Before getting into the transaction part of the procedures and other useful information about PL/SQL, let’s take a brief look at UPDATE statements, which tend to be very different in SQL Server and Oracle. The transition from doing SQL Server updates to handling them in Oracle is not easy. It may take several tries to not think in SQL Server syntax and get the correct statement for an Oracle update. Table 9-3 shows a couple of examples.

One difference is that in Oracle, you can group the columns being updated to set more than one column equal to the SELECT statement. Another is that instead of needing to list the table again for joins, Oracle can use the table being updated to join against in the query. To test the SQL ...

Get Oracle Database Administration for Microsoft SQL Server DBAs now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.