Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exclude in the Select statement

Status
Not open for further replies.

Leon1977

IS-IT--Management
Jun 27, 2001
79
BG
Is there a clause that excludes colums from the select statement....

Lets say I want to select several columns
the select statements looks like this

select c1,c2,c3,c4,c5,c6,c7,c8,c9,c10
from table1

theese columns c1,c2,c3,c4,c5,c6,c7,c8,c9,c10 plus c11
are all columns of the table "Table1"

is there a way i could say somethig like this
Select *, excluding c11
from table1

 
I don't think it's possible, using select * is bad form anyway, your database structure may change and the select statement would then produce unexpected results. You should always explicitly code your select statements. SOL
I'm only guessing but my guess work generally works for me.
 

If you are using sqlplus, you can use the COLUMN option NOPRINT.

For example, you don't want to include column1 from the SQL:

COLUMN column1 NOPRINT

SELECT *
FROM table1;


Robbie

"The rule is, not to besiege walled cities if it can possibly be avoided" -- Art of War
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top