tailieunhanh - SQL Anywhere Studio 9- P2
Tham khảo tài liệu 'sql anywhere studio 9- p2', công nghệ thông tin, cơ sở dữ liệu phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 36 Chapter 1 Creating Tip In SQL Anywhere 9 you can call a procedure in the SELECT FROM clause. This means you can treat a procedure call just like a table and join it to other tables. Global Temporary Tables The global temporary table is the only kind of temporary table where the schema is permanently recorded in the system catalog tables. The schema persists until the table is explicitly dropped and the table is available to all connections. The data however is partitioned separately for each connection as if each connection owned its own copy of the table. Like global permanent tables global temporary tables are created ahead of time and then used by whatever connections need them. Like local temporary tables the data inserted by one connection is invisible to all other connections. create_global_temporary_table CREATE GLOBAL TEMPORARY TABLE owner_name . table_name table_element_list conrnit_action table_name identifier commit_action ON COMMIT DELETE ROWS ON COMMIT PRESERVE ROWS NOT TRANSACTIONAL It doesn t matter if the table name begins with a number sign or not a global temporary table is created either way. A global temporary table can have the same list of table elements as a global permanent table one or more column definitions plus any table constraints and properties that might apply. The commit action controls what happens to the data when a COMMIT or ROLLBACK is executed. ON COMMIT DELETE ROWS means that all the data will be deleted when a COMMIT is executed that changes will be rolled back when a ROLLBACK is executed and that otherwise the data persists until explicitly deleted or the connection is dropped. This is the default behavior and often comes as a surprise during testing Where did all my data go All I did was commit ON COMMIT PRESERVE ROWS means that a COMMIT will commit the changes instead of deleting all the data. This is useful during long processes where commits are frequently done to free locks. Here is an example that shows that
đang nạp các trang xem trước