- Rongsen.Com.Cn 版权所有 2008-2010 京ICP备08007000号 京公海网安备11010802026356号 朝阳网安编号:110105199号
- 北京黑客防线网安工作室-黑客防线网安服务器维护基地为您提供专业的
服务器维护
,企业网站维护
,网站维护
服务 - (建议采用1024×768分辨率,以达到最佳视觉效果) Powered by 黑客防线网安 ©2009-2010 www.rongsen.com.cn
作者:黑客防线网安SQL维护基地 来源:黑客防线网安SQL维护基地 浏览次数:0 |
清单2. 测试过程 TRUNCATE_TABLE
/* create and insert some values into the table tab1 */
CREATE TABLE tab1 (col1 INTEGER NOT NULL PRIMARY KEY, col2 VARCHAR(15) )
DB20000I The SQL command completed successfully.
INSERT INTO tab1 VALUES ( 1, 'some data' ), ( 2, NULL )
DB20000I The SQL command completed successfully.
/* verify the current contents of table tab1 */
SELECT * FROM tab1
COL1 COL2
----------- ---------------
1 some data
2 -
2 record(s) selected.
/* Call the truncate stored procedure for the DB2INST1 schema, and the table tab1 */
CALL truncate('DB2INST1', 'tab1')
Return Status = 0
/* Verify that the table contents have been truncated. */
SELECT * FROM tab1
COL1 COL2
----------- ---------------
0 record(s) selected.
/* Insert some new values into the tab1 table */
INSERT INTO tab1 VALUES ( 2, 'some new data' ), ( 3, NULL )
DB20000I The SQL command completed successfully.
SELECT * FROM tab1
COL1 COL2
----------- ---------------
2 some new data
3 -
2 record(s) selected.
/* Call the truncate procedure with a NULL schema */
CALL truncate(NULL, 'tab1')
Return Status = 0
/* Verify that the table contents have been truncated. */
SELECT * FROM tab1
COL1 COL2
----------- ---------------
0 record(s) selected.
Sybase 的 host_name 函数
Sybase 数据库中的 host_name( ) 函数返回的是 客户机进程(非 Adaptive Server 进程)的当前主机名,也就是运行该应用程序的计算机的主机名而非数据库服务器的主机名。
清单3 中展示了用户定义函数 HOST_NAME 的签名。
我要申请本站:N点 | 黑客防线官网 | |
专业服务器维护及网站维护手工安全搭建环境,网站安全加固服务。黑客防线网安服务器维护基地招商进行中!QQ:29769479 |