Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

Some Frequently used BTEQ commands

To run a very long SQL query put it in a file and run the file from the BTEQ command
prompt as follows
.run file=filename path (i.e.
c!mypath!mysu"path!myfirstBTEQ.t#t$
To set%change default data"ase for the session$
&ata"ase 'data"ase name($
To display all the default BTEQ settings
show control$
To show o")ect (ta"le* view etc+ definition or create o")ect statement
show 'ta"le%view%inde#%procedure%trigger( $
To terminate the connection as well as BTEQ session
.quit%.e#it$
To terminate the connection only and ,-T the BTEQ session
.logoff
To see columns in a ta"le or view
help .ta"le%view/ 'data"ase.ta"le%view name($
To list all the o")ects present in a particular data"ase*
help data"ase 'data"ase name(
To display column headings vertically
.set sidetitles on
0emem"er that all BTEQ commands (,-T SQL commands you run in BTEQ+ must "e
preceded "y a dot 1.2 character and also BTEQ commands may or may not end with a
semicolon 1$2. 3f you want to e#ecute BTEQ commands inside of a &B4%SQL query%macro*
this can "e done "y using the E45- statement* for e#ample
echo 1.help "teq2$
The 1help "teq2 command displays a complete list of BTEQ commands with synta#.

You might also like