SQL PLUS Session Environment Oracle PLSQL Tutorial

SQL>
SQL> define gname=idle
SQL>
SQL> column global_name new_value gname
SQL>
SQL> select lower(user) || '@' ||
  2         substr( global_name, 1, decode( dot,
  3                                         0, length(global_name),
  4                                            dot-1) ) global_name
  5    from (select global_name, instr(global_name,'.') dot
  6            from global_name );
GLOBAL_NAME
-----------------------------------------------------------------------------------------------------------------------------------
rntsoft@XE
SQL> set sqlprompt '&gname> '
SQL>