[英]编程快参 oracle plsql cheatsheet

更新时间:2023-05-21 12:31:08 阅读: 评论:0

Oracle PL/SQL
Cheatsheet
Symbols
; Semicolon.Statement terminator
tpx% Percent sign Attribute indicator (cursor attributes like
%ISOPEN and indirect declaration attributes like %ROWTYPE). Also ud as multibyte wildcard symbol, as in SQL.
_ Single underscore Single-byte wildcard symbol, as in SQL
: Colon Host variable indicator, such as :block.item in Oracle Forms
** Double asterisk Exponentiation operator
< > and !=Not equals"
|| Double vertical bar Concatenation operator
<< and >>Label delimiters
:=Assignment operator
=>Association operator for positional notation
--Double dash: single-line comment indicator
/* and */Beginning and ending multiline comment block delimiters
Data Types.rockmelon
Databa types NUMBER
CHAR(N), VARCHAR2(N)
DATE
LONG LONG RAW
ROWID MLSLABEL Definition牛津小学英语2a
Ud to store any number
Ud for storing text
Oracle system date
Stores large blocks of text Stores large blocks of binary data Smaller binary data store
Uesd for row identifier
Security label
Non databa types.DEC, DECIMAL, REAL, DOUBLE-PRECISION, INTEGER, INT, SMALLINT, NATURAL, POSITIVE, NUMERIC, BINARY-INTEGER, CHARACTER, VARCHAR, BOOLEAN, TABLE, RECORD
PLSQL Module types
Procedure A non-formal function that can accept paremeters via value or reference. Similar in form to a function.
jgbFunction A classical function that returns one value. Usually contains declaration, execution and exception ctions.
Package A library, consisting of a specification with function/prototype signatures, and a body with actual code. eg
Trigger
划船的英文Code attached to a table that fires on certian conditions.
Module Sections or Blocks
Variable Declaration DECLARE
pid%TYPE, pi CONSTANT number := 3.14, ratio REAL,.. BEGIN..
Executable Section .. BEGIN lect * into my_employee id = 42; END; ..
Exception Handler.END; EXCEPTIONS .. END;
Package Syntax
Specification PACKAGE package_name
IS
[ declarations of variables and types ] [ specifications of cursors ]
[ specifications of modules ]
END [ package_name ];
Body PACKAGE BODY package_name
IS
[ declarations of variables and types ] [ specification and SELECT statement of cursors ]
cgnp
[ specification and body of modules ] [ BEGIN
executable statements ]
[ EXCEPTION
exception handlers ]
END [ package_name ];
高斯奥特曼片尾曲Filename Extensions
General SQL*Plus
master piece
disguiscript
.sql
Testing script.tst
Stored procedure.sp
Stored function.sf
Stored package body spb
Stored package
specification
.sps
Implict cursor attributes.
%NOTFOUND True if fetch did not return row.
%ROWCOUNT Number of rows procesd by this cursor %FOUND Opposite of %NOTFOUND
%ISOPEN If currently open for processing then true.
Transaction processing
Same Options as SQL COMMIT, ROLLBACK, SAVEPOINT Transaction begins at
execution of first
change of data.
Rollbacks go to last COMMIT or SAVE_POINT
solemnly
DBMS_TRANSACTION A package with functions for transaction control.

本文发布于:2023-05-21 12:31:08,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/90/117055.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图