首页 > 代码库 > 利用管道在SQL中实现查询分页显示和筛选

利用管道在SQL中实现查询分页显示和筛选

 

 分页显示:

[oracle@zytk32 ~]$ echo "desc dbms_sqltune"|sqlplus / as sysdba | moreSQL*Plus: Release 11.2.0.4.0 Production on Sat Sep 24 13:04:17 2016Copyright (c) 1982, 2013, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> 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 DROPPROCEDURE DROP_SQLSETPROCEDURE DROP_SQL_PROFILEPROCEDURE 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     DEFAULTPROCEDURE DROP_TUNING_TASK Argument Name            Type            In/Out Default? ------------------------------ ----------------------- ------ --------

 

利用管道在SQL中实现查询分页显示和筛选