FirebirdSQL/3/Store Procedure
出自VFP Wiki
(修訂版本間差異)
(→存储过程(Stored Procedure)的语法) |
OrerdOmtro (對話 | 貢獻) |
||
第1行: | 第1行: | ||
- | === | + | http://www.texttrlatrrac.com |
- | + | === åå¨è¿ç¨æ¯ä»ä¹ === | |
+ | é åç¨åº(Stored Procedure)(簡稱SP)æ¯ä½¿ç¨è
é å
寫好çè³æ庫Scriptã | ||
- | + | SPæ大好èæ¯å¯ä»¥éä½è³æå¨ç¶²è·¯ä¾åå³éèç¶²è·¯è² è¼ï¼å çºæåå°èçè³æçç¨å¼ç¢¼å¯«å¨ä¼ºæå¨ç«¯ï¼é£éº¼å®¢æ¶ç«¯å°åªææ¶å°ç¶éèçå¾çç´éï¼å¦æ¤è³æ庫伺æå¨æè½æ大大çæåï¼ | |
- | === | + | === åå¨è¿ç¨(Stored Procedure)ç¸å
³èªæ³ === |
- | * | + | *åå¨è¿ç¨(Stored Procedure)å建çèªæ³ï¼ |
<pre> | <pre> | ||
CREATE PROCEDURE name | CREATE PROCEDURE name | ||
- | [( param datatype [, param datatype | + | [( param datatype [, param datatype â¦])] |
- | [RETURNS ( param datatype [, param datatype | + | [RETURNS ( param datatype [, param datatype â¦])] |
AS | AS | ||
<procedure_body>; | <procedure_body>; | ||
第16行: | 第17行: | ||
<variable_declaration_list> = | <variable_declaration_list> = | ||
DECLARE VARIABLE var datatype; | DECLARE VARIABLE var datatype; | ||
- | [DECLARE VARIABLE var datatype; | + | [DECLARE VARIABLE var datatype; â¦] |
<block> = | <block> = | ||
BEGIN | BEGIN | ||
< compound_statement> | < compound_statement> | ||
- | [< compound_statement> | + | [< compound_statement> â¦] |
END | END | ||
<compound_statement> = {<block> | statement;} | <compound_statement> = {<block> | statement;} | ||
</pre> | </pre> | ||
- | *Stored Procedure | + | *Stored Procedure ä¿®æ¹çèªæ³ï¼ |
<pre> | <pre> | ||
ALTER PROCEDURE name | ALTER PROCEDURE name | ||
- | [( var datatype [, var datatype | + | [( var datatype [, var datatype â¦])] |
- | [RETURNS ( var datatype [, var datatype | + | [RETURNS ( var datatype [, var datatype â¦])] |
AS | AS | ||
procedure_body; | procedure_body; | ||
</pre> | </pre> | ||
- | *Stored Procedure | + | *Stored Procedure 移é¤çèªæ³ï¼ |
<pre> | <pre> | ||
DROP PROCEDURE name; | DROP PROCEDURE name; | ||
</pre> | </pre> | ||
- | === Stored Procedure | + | === Stored Procedure ç¯ä¾ === |
- | *Stored Procedure | + | *Stored Procedure 建ç«çèªæ³ï¼ |
- | *Stored Procedure | + | *Stored Procedure ä¿®æ¹çèªæ³ï¼ |
- | *Stored Procedure | + | *Stored Procedure 移é¤çèªæ³ï¼ |
- | === | + | === ç¸éæç« === |
- | *[http://www.aboutcase.com/phorum/read.php?f=38&i=22&t=19 | + | *[http://www.aboutcase.com/phorum/read.php?f=38&i=22&t=19 é å²ç¨åºå¨ç¶²ç«æç¨ç¨å¼ä¸çæç¨(ä¸)] |
- | *[http://yes.nctu.edu.tw/SQL/StoredProcedure/StoredProcedure.htm | + | *[http://yes.nctu.edu.tw/SQL/StoredProcedure/StoredProcedure.htm é åç¨åº] |
*[http://uiproject.udngroup.com.tw/ui/TechDocs/SQL/Lessons/Implement/StoredProcedure.htm SQL Server-Stored Procedure] | *[http://uiproject.udngroup.com.tw/ui/TechDocs/SQL/Lessons/Implement/StoredProcedure.htm SQL Server-Stored Procedure] |
在2009年5月21日 (四) 15:10所做的修訂版本
目錄 |
åå¨è¿ç¨æ¯ä»ä¹
é åç¨åº(Stored Procedure)(簡稱SP)æ¯ä½¿ç¨è é å 寫好çè³æ庫Scriptã
SPæ大好èæ¯å¯ä»¥éä½è³æå¨ç¶²è·¯ä¾åå³éèç¶²è·¯è² è¼ï¼å çºæåå°èçè³æçç¨å¼ç¢¼å¯«å¨ä¼ºæå¨ç«¯ï¼é£éº¼å®¢æ¶ç«¯å°åªææ¶å°ç¶éèçå¾çç´éï¼å¦æ¤è³æ庫伺æå¨æè½æ大大çæåï¼
åå¨è¿ç¨(Stored Procedure)ç¸å ³èªæ³
- åå¨è¿ç¨(Stored Procedure)å建çèªæ³ï¼
CREATE PROCEDURE name [( param datatype [, param datatype â¦])] [RETURNS ( param datatype [, param datatype â¦])] AS <procedure_body>; <procedure_body> = [<variable_declaration_list>] <block> <variable_declaration_list> = DECLARE VARIABLE var datatype; [DECLARE VARIABLE var datatype; â¦] <block> = BEGIN < compound_statement> [< compound_statement> â¦] END <compound_statement> = {<block> | statement;}
- Stored Procedure ä¿®æ¹çèªæ³ï¼
ALTER PROCEDURE name [( var datatype [, var datatype â¦])] [RETURNS ( var datatype [, var datatype â¦])] AS procedure_body;
- Stored Procedure 移é¤çèªæ³ï¼
DROP PROCEDURE name;
Stored Procedure ç¯ä¾
- Stored Procedure 建ç«çèªæ³ï¼
- Stored Procedure ä¿®æ¹çèªæ³ï¼
- Stored Procedure 移é¤çèªæ³ï¼