⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timestamp.sql

📁 介绍Oracle PL SQL编程
💻 SQL
字号:
/*
 * Timestamp.sql
 * Chapter 3, Oracle10g PL/SQL Programming
 * by Ron Hardman, Mike McLaughlin, Scott Urman
 *
 * This script demonstrates the TIMESTAMP datatypes
 */

exec clean_schema.trigs
exec clean_schema.procs
exec clean_schema.tables

SET SERVEROUTPUT ON

PROMPT
PROMPT ** The TIMESTAMP datatype stores the date/time as follows:
PROMPT

DECLARE
   v_datetime TIMESTAMP := SYSTIMESTAMP;
BEGIN
   DBMS_OUTPUT.PUT_LINE(v_datetime);
END;
/


PROMPT
PROMPT ** The TIMESTAMP WITH TIME ZONE datatype stores the date/time
PROMPT **  slightly different:
PROMPT

DECLARE
   v_datetime TIMESTAMP (3) WITH TIME ZONE := SYSTIMESTAMP;
BEGIN
   DBMS_OUTPUT.PUT_LINE(v_datetime);
END;
/


PROMPT
PROMPT ** The TIMESTAMP WITH LOCAL TIME ZONE datatype stores the date/time
PROMPT **  slightly different:
PROMPT

DECLARE
   v_datetime TIMESTAMP (0) WITH LOCAL TIME ZONE := SYSTIMESTAMP;
BEGIN
   DBMS_OUTPUT.PUT_LINE(v_datetime);
END;
/


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -