www.webdeveloper.com
Results 1 to 3 of 3

Thread: select only columns which do not contain zero

  1. #1
    Join Date
    Mar 2007
    Posts
    34

    select only columns which do not contain zero

    i have a table with around 20 columns of data.

    How do i do a query to select only the columns which do not contain 0 ?

    Thanks in advance!

  2. #2
    Join Date
    Aug 2007
    Location
    Leeds, Yorkshire, England
    Posts
    387
    SELECT * FROM tablename WHERE columnname != 0

  3. #3
    Join Date
    Mar 2007
    Posts
    34
    But SELECT * will show all columns.

    Maybe this will be clearer:

    I want to do a query to find columns which do not contain 0's
    Only these columns will appear in the results, the columns which contain all zeros will not be displayed.
    Last edited by mr_newbie; 02-19-2010 at 08:53 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles