tailieunhanh - PL/SQL User's Guide and Reference 10g Release phần 10

Tham khảo tài liệu 'pl/sql user's guide and reference 10g release phần 10', 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ả | TIMESTAMP_TO_SCN Function TIMESTAMP_TO_SCN Function Syntax return_value TIMESTAMP_TO_SCN timestamp Purpose TIMESTAMP_TO_SCN takes an argument that represents a precise time and returns the system change number SCN of the database at that moment in time. The returned value has the datatype NUMBER. Usage Notes This function is part of the flashback query feature. System change numbers provide a precise way to specify the database state at a moment in time so that you can see the data as it was at that moment. Call this function to find out the system change number associated with the date and time to which you want to flash back . Examples DECLARE right_now TIMESTAMP yesterday TIMESTAMP sometime TIMESTAMP scnl INTEGER scn2 INTEGER scn3 INTEGER BEGIN -- Get the current SCN. right_now SYSTIMESTAMP scn1 TIMESTAMP_TO_SCN right_now Current SCN is scn1 -- Get the SCN from exactly 1 day ago. yesterday right_now - 1 scn2 TIMESTAMP_TO_SCN yesterday SCN from yesterday is scn2 -- Find an arbitrary SCN somewhere between yesterday and today. -- In a real program we would have stored the SCN at some significant moment. scn3 scn1 scn2 2 -- Find out what time that SCN was in effect. sometime SCN_TO_TIMESTAMP scn3 SCN scn3 was in effect at TO_CHAR sometime END Related Topics SCN_TO_TIMESTAMP Function 13-138 PL SQL User s Guide and Reference TYPE Attribute TYPE Attribute The TYPE attribute lets use the datatype of a field record nested table database column or variable in your own declarations instead of hardcoding the type names. You can use the TYPE attribute as a datatype specifier when declaring constants variables fields and parameters. If the types that you reference change your declarations are automatically updated. This technique saves you from making code changes when for example the length of a VARCHAR2 column is increased. For more information see Using the TYPE Attribute on page 2-9. Syntax Keyword and .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã 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.