Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Location
    Toronto, Canada
    Posts
    31

    Unanswered: Select all values with exceptions

    Hi,

    I was wondering if there was a SQL expression to select all values from a record exception for a particular column(s) without explicity stating all the column names.

    For example, for a table called employees with columns, "id", "fname", "lname", "department", "phone", "location", is it possible to select all columns exception for "location"?

    Is there a faster way to get the same results as this query:
    select id, fname, lname, department, phone from employees;
    without typing all the columns names out?

  2. #2
    Join Date
    Apr 2003
    Location
    NY
    Posts
    208

    Re: Select all values with exceptions

    Don't think there is anyway to get everything except a column.

    You can always create a view that only has the fields you want displayed

    create or replace view employees_vw as
    select id, fname, lname, department, phone from employees;

    then you can simply use

    select *
    from employees_vw

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •