利用管道在SQL中实现查询分页显示和筛选
分页显示:
[oracle@zytk32 ~]$ echo "desc dbms_sqltune"|sqlplus / as sysdba | more SQL*Plus: Release 11.2.0.4.0 Production on Sat Sep 24 13:04:17 2016 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> FUNCTION ACCEPT_SQL_PROFILE RETURNS VARCHAR2 Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- TASK_NAME VARCHAR2 IN OBJECT_ID NUMBER IN DEFAULT NAME VARCHAR2 IN DEFAULT DESCRIPTION VARCHAR2 IN DEFAULT --More--
筛选:
[oracle@zytk32 ~]$ echo "desc dbms_sqltune"|sqlplus / as sysdba | grep DROP PROCEDURE DROP_SQLSET PROCEDURE DROP_SQL_PROFILE PROCEDURE DROP_TUNING_TASK
[oracle@zytk32 ~]$ echo "desc dbms_sqltune"|sqlplus / as sysdba | grep DROP_SQL_PROFILE -A 7 //从匹配字符处开始再往下显示7行 PROCEDURE DROP_SQL_PROFILE Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ -------- NAME VARCHAR2 IN IGNORE BOOLEAN IN DEFAULT PROCEDURE DROP_TUNING_TASK Argument Name Type In/Out Default? ------------------------------ ----------------------- ------ --------
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步