Oracle PL/SQL/SQL Plus/define

Материал из SQL эксперт
Перейти к: навигация, поиск

Check pre-defined variables

    
SQL>
SQL> def x
DEFINE X               = "7500" (CHAR)
SQL> def
DEFINE _DATE           = "" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "XE" (CHAR)
DEFINE _USER           = "sqle" (CHAR)
DEFINE _PRIVILEGE      = "" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1002000100" (CHAR)
DEFINE _EDITOR         = "Notepad" (CHAR)
DEFINE _O_VERSION      = "Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production" (CHAR)
DEFINE _O_RELEASE      = "1002000100" (CHAR)
DEFINE _RC             = "0" (CHAR)
DEFINE X               = "7500" (CHAR)
SQL> undefine x
SQL>



show define

  
SQL>
SQL> show define
define "&" (hex 26)
SQL> show concat
concat "." (hex 2e)
SQL>



Using the Define Command

   
col segment_name for a27
define owner = "&1"
select segment_name,segment_type,extents from dba_segments where owner = upper ("&owner)
and extents > 10 and segment_name not like "TMP%"
order by segment_type,extetns desc
@extents.sql