Loading topic
dept_demo, emp_demo, emp_stage and `emp_arch6 min readUPDATE changes column values in rows that already exist. This chapter covers the syntax, how Oracle evaluates the SET list, what the row count means, the errors you will meet most often, and the locking behavior that follows from changing a row. Subqueries in UPDATE, RETURNING INTO, and `MER5 min readUPDATE ... SET column = literal WHERE ... only works when you already know the new values. Often the new value, or the set of rows to change, comes from another query. This chapter covers the three places a subquery can appear in an UPDATE, how correlated subqueries are evaluated, and th5 min readDELETE removes rows from an Oracle table, how it interacts with foreign keys and transactions, and how to run it safely. It assumes you can write a SELECT with a WHERE clause, know primary key, foreign key, and NOT NULL constraints, and can run SQL in SQL*Plus, SQL De6 min readDELETE and TRUNCATE TABLE. It assumes you can write a DELETE ... WHERE statement, know what COMMIT and ROLLBACK do, and understand primary key and foreign key constraints. The chapter uses the dept_demo, emp_demo, emp_stage, and `emp_a5 min readINSERT, UPDATE, and DELETE statements, know what a transaction is, and have read simple PL/SQL blocks (DECLARE, BEGIN, END). It uses the emp_demo table from earlier chapters.5 min readdept_demo and emp_demo tables from the earlier chapters.6 min readdept_demo, emp_demo, emp_stage, and `emp6 min readMERGE ... USING ... ON ... WHEN MATCHED / NOT MATCHED form from the previous chapter. It also assumes you have the dept_demo, emp_demo, and emp_stage tables from the setup chapter. A plain MERGE touches every matched row and inserts every unmatched row5 min readLOG ERRORS clause tells Oracle to write each failing row to an error table and keep processing the rest. This chapter shows how to create 6 min readINSERT ... SELECT statements that scan the same source repeatedly.4 min readINSERT ... SELECT, understand COMMIT and ROLLBACK, and know what a table segment and an index are. It uses the emp_demo and emp_archive tables from earlier chapters.6 min read