|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Select all but one
Can anyone tell me a select query that selects all columns but one in oracle or sql server?
For example select * (exclude column a) |
|
#2
|
||||
|
||||
|
afaik the only way to do this is to explicitly name the columns that you do want, ie
Code:
select col1, col2, col3 from table.. christo
__________________
. Spiration channels: Free scripts, programming tutorials and articles Dotcut alerts: Online Press cuttings / news alerts Clearprop: UK microlight school, wiltshire Uk dating: UK safe dating with Topdates About Christo . . |
|
#3
|
||||
|
||||
|
I'm with christo on this one don't think you can use an except or exclude clause on a column. If for some reason you want to be able to write shorthand and you're always excluding that same column, you can just create a view to your table that excludes that one column and you can always do a select * on your view.
HTH, -b
__________________
PostgreSQL, it's what's for dinner... |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > Select all but one |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|