db2 =>CREATE PROCEDURE GETDBNAME
db2 (cont.) => (OUT "DBNAME" VARCHAR(15)
db2 (cont.) => )
db2 (cont.) => LANGUAGE SQL
db2 (cont.) => BEGIN
db2 (cont.) =>
db2 (cont.) => SET DBNAME = (SELECT DB_NAME FROM TABLE(SNAP_GET_DB('',-1)) AS S)
db2 (cont.) =>
db2 (cont.) => END@
DB20000I SQL 命令成功完成。
db2 =>
db2 =>CALL GETDBNAME(?)@
输出参数的值
--------------------------
参数名: DBNAME
参数值: SAMPLE
返回状态 = 0
db2 =>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)