Thursday, August 29, 2013

SQL Prompt - list, editor, column adjustment,



SQL>list // list the previous command


To open a editor in SQL prompt and edit the command that was typed in previously



SQL>define _editor = "gedit" //sets the editor to geditor,


P.S - SQL>define - gives you the defined current variables



SQL>edit // you will have the geditor open and you can enter the commands\edit it


Editor open with a file afiedt.buf in the home folder -> once you have written into it -> Save your changes, MAKE SURE THE END OF CHARACTER OF THE FILE IS ->  / ( Just like ;)



SQL>/  //Runs the edited query 



Setting the width of the column



SQL>column column_name format a30; // sets the column to a size of 30 characters
 
 
Setting the size of a line

SQL>set linesize 300;

Setting the size of pagination or size of the page



SQL> set page size 0;

No comments:

Post a Comment