Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is it possible to make the SQL*Plus prompt with "newline" character ?
I modified Connor's instructions at
http://www.jlcomp.demon.co.uk/faq/sqlplus_prompt.html to do this
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Feb 10 13:40:10 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL>define prompt ='not connected' SQL>column x new_value prompt SQL>set termout off SQL>select global_name||chr(10)||'>' x from global_name; SQL>set sqlprompt '&&prompt'
1
1
Note the caveat (pre 10g) that if you put this in glogin.sql then issue conn dbname/pass_at_db the script doesn't get reexecuted and you end up thinking you are on test instead of production or whatever. Apparently 10g fixes this behaviour, but I have just hosed my linux box so can't verify this.
-- Niall Litchfield Oracle DBA Audit Commission UK "David" <david_at_david.nospam.com> wrote in message news:c0aij0$oc92_at_imsp212.netvigator.com...Received on Tue Feb 10 2004 - 07:55:51 CST
> I want to create the prompt like this:
>
> <database_name>
> > select * from v$database;
> .
> .
> .
>
> 1 rows selected
>
> <database_name>
> > select * from v$database;
>
> i.e. is it possible to do something like this <database_name> || chr(10)
||
> >
>
>
>
![]() |
![]() |