Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What Happens If the UPDATE Subquery Returns Multiple Rows
What Happens If the UPDATE Subquery Returns Multiple Rows? - Oracle DBA FAQ - Understanding SQL DML Statements
✍: FYIcenter.com
If a subquery is used in a UPDATE statement, it must return exactly one row for each row in the update table that matches the WHERE clause. If it returns multiple rows, Oracle server will give you an error message. To test this out, you can try the following tutorial exercise:
UPDATE fyi_links SET (notes, created) = (SELECT last_name, hire_date FROM employees WHERE employee_id < id) WHERE id < 110; ERROR at line 1: ORA-01427: single-row subquery returns more than one row
The problem is the criteria in the subquery: "employee_id < id"
2007-04-21, 7000👍, 0💬
Popular Posts:
What will be printed as the result of the operation below: main() { char *p1; char *p2; p1=(char *)m...
How To Use SELECT Statement to Count the Number of Rows? - Oracle DBA FAQ - Understanding SQL SELECT...
How To Use SELECT Statement to Count the Number of Rows? - Oracle DBA FAQ - Understanding SQL SELECT...
How To Empty Your Recycle Bin? - Oracle DBA FAQ - Managing Oracle Database Tables If your recycle bi...
How To Blend a Color Layer to a Image? - PSP Tutorials - Fading Images to Background Colors with PSP...