TAILIEUCHUNG - PL/SQL User’s Guide and Reference phần 10

literals Nghĩa đen là một nhân vật rõ ràng, số, chuỗi, hoặc giá trị Boolean không được đại diện bởi một định danh. Số đen 135 và chuỗi đen 'hello thế giới là những ví dụ. Để biết thêm thông tin, Các ví dụ sau đây cho thấy các hình thức khác nhau của câu lệnh INSERT: | UPDATE Statement UPDATE Statement The UPDATE statement changes the values of specified columns in one or more rows in a table or view. For a full description of the UPDATE statement see Oracle8i SQL Reference. Syntax update_statement Keyword and Parameter Description alias This is another usually short name for the referenced table or view and is typically used in the WHERE clause. 11-172 PL SQL User s Guide and Reference UPDATE Statement column_name This is the name of the column or one of the columns to be updated. It must be the name of a column in the referenced table or view. A column name cannot be repeated in the column_name list. Column names need not appear in the UPDATE statement in the same order that they appear in the table or view. returning_clause This clause lets you return values from updated rows thereby eliminating the need to SELECT the rows afterward. You can retrieve the column values into variables and or host variables or into collections and or host arrays. However you cannot use the RETURNING clause for remote or parallel updates. For the syntax of returning_clause see DELETE Statement on page 11-52. SET column_name sql_expression This clause assigns the value of sql_expression to the column identified by column_name. If sql_expression contains references to columns in the table being updated the references are resolved in the context of the current row. The old column values are used on the right side of the equal sign. In the following example you increase every employee s salary by 10 . The original value of the sal column is multiplied by then the result is assigned to the sal column overwriting the original value. UPDATE emp SET sal sal SET column_name subquery3 This clause assigns the value retrieved from the database by subquery3 to the column identified by column_name. The subquery must return exactly one row and one column. SET column_name column_name . subquery4 This clause assigns the values retrieved from the database

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.