Veröffentlicht am Donnerstag, 3 August 2023 SQLcl - The alias command Kategorie Oracle (Database & Co) Was kann man in SQLcl mit Aliassen machen? Alias is a command which allows you to save a sql, plsql or sqlplus script and assign it a shortcut command. The alias command is persistent. This means when you start a new SQLcl session, it will load all your previously declared aliases.Befehlsübersicht sqlcl> help alias Alias erstellen sqlcl> alias whoami = select sys_context('userenv', 'session_user') from dual; sqlcl> alias usersource = select * from user_source s where upper(s.text) like upper('%' || :1 || '%)'; sqlcl> alias emp1 = select * from emp where ename = :ENAME order by empno; sqlcl> alias emp2 = select * from emp where job like '%'||upper(:JOB)||'%' and ename like '%'||upper(:ENAME)||'%' order by empno; Aliasse auflisten sqlcl> alias Inhalt des Alias anzeigen sqlcl> alias list usersource Alias ausführen sqlcl> whoami sqlcl> usersource <MEIN_SUCHTEXT> sqlcl> emp1 KING sqlcl> emp2 CLERK A Alias exportieren sqlcl> alias save whoami.xml Alias importieren sqlcl> alias load path/to_my/whoami.xml Alias entfernen sqlcl> alias drop whoamiSehr hilfreiche Blogposts findet man unter:Aliases with sdsql and simpler CTASSQLcl Aliases With VariablesSQLcl ALIAS – because you can’t remember everything.