Professional Web Applications Themes

select all columns in a table, save for one - MySQL

Say a table had 15 columns and I wanted to select 14 of them. Is there a way I could specificy the column I didn't wanted selected instead of having to explicitly specify every column I do want selected?...

  1. #1

    Default select all columns in a table, save for one

    Say a table had 15 columns and I wanted to select 14 of them. Is there
    a way I could specificy the column I didn't wanted selected instead of
    having to explicitly specify every column I do want selected?

    yawnmoth Guest

  2. #2

    Default Re: select all columns in a table, save for one

    yawnmoth wrote:
    > Say a table had 15 columns and I wanted to select 14 of them. Is there
    > a way I could specificy the column I didn't wanted selected instead of
    > having to explicitly specify every column I do want selected?
    No, there is no syntax to do this.

    FWIW, I always specify all columns in my SELECT queries anyway.
    I never use "SELECT *". That can hide errors if the columns change
    their name or their order.

    Regards,
    Bill K.
    Bill Karwin Guest

  3. #3

    Default Re: select all columns in a table, save for one

    yawnmoth wrote:
    > Say a table had 15 columns and I wanted to select 14 of them. Is there
    > a way I could specificy the column I didn't wanted selected instead of
    > having to explicitly specify every column I do want selected?
    >
    Unfortunately, not.

    But that's also a good thing. What happens if someone later adds
    another column such as a BLOB to the table?

    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    [email]jstucklexattglobal.net[/email]
    ==================
    Jerry Stuckle Guest

Similar Threads

  1. SELECT * / Order of Columns
    By dj shane in forum Coldfusion Database Access
    Replies: 6
    Last Post: November 6th, 07:32 PM
  2. Comparing 2 columns in my select
    By blastbeat in forum Coldfusion Database Access
    Replies: 0
    Last Post: October 27th, 10:37 PM
  3. table columns misbehving...please help
    By pulling_hair_out webforumsuser@macromedia.com in forum Macromedia Dynamic HTML
    Replies: 3
    Last Post: August 20th, 04:30 PM
  4. Selecting all columns, but in a different order in SELECT statement
    By Alex in forum Microsoft SQL / MS SQL Server
    Replies: 5
    Last Post: July 12th, 07:38 AM
  5. Replies: 0
    Last Post: July 2nd, 06:18 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139