Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Query

  1. #1

    Default Query


    Hi guys,

    Lets assume nga naa moy isa ka table then with 20 colums..

    how do u construct a query that would select all 19 colums pero dili i.explicit ug apil sa query ang column name...

    in short "select * except a column" how to do this?

    Thanks guys in advance...
    Last edited by UtOkbOlinAO; 07-09-2009 at 03:57 PM.

  2. #2
    SQL ni dong?.. ang solutions ani kay ayaw pag tinapulan... i explicitly specify nimo kung unsa ra imong i apli.. kung ganahan jud kag mo gamit og select all (*), hala pag create og view nga mo exclude atong column ng di nimo ganahan i apil sa query nya adto pag select all...

    hina-ut nka tabang ko dong.. cheers!

  3. #3
    Site Keeper clarkhkent's Avatar
    Join Date
    Aug 2003
    Gender
    Male
    Posts
    8,798
    Blog Entries
    1
    google daw rold

  4. #4
    you can use the result of this statement:

    show columns from <tablename> where field not in ('field-to-skip', 'field-to-skip2');

    to your select statement dynamically ...

    try it out, not sure if that would work though.

  5. #5
    Quote Originally Posted by kolz View Post
    you can use the result of this statement:

    show columns from <tablename> where field not in ('field-to-skip', 'field-to-skip2');

    to your select statement dynamically ...

    try it out, not sure if that would work though.
    bro, thanks for the post but it doesnt work also...

  6. #6
    Quote Originally Posted by clarkhkent View Post
    google daw rold
    nice suggestion. simple but straight to the point. nice work brad. lolz...

    @utok..

    dali ra na. i drop na lang tanang table. hehehe.. jok lang...
    mapangitaan lagi na ug pa agi...

  7. #7
    Quote Originally Posted by raybanz21 View Post
    nice suggestion. simple but straight to the point. nice work brad. lolz...

    @utok..

    dali ra na. i drop na lang tanang table. hehehe.. jok lang...
    mapangitaan lagi na ug pa agi...
    mao rani akong gikinahanglan

    SELECT COLUMN_NAME
    FROM USER_TAB_COLUMNS
    WHERE TABLE_NAME = XTABLE
    AND COLUMN_NAME <> XCOLUMN

  8. #8
    lisura ani oi...hehehehe

  9. #9
    Quote Originally Posted by UtOkbOlinAO View Post
    Hi guys,

    Lets assume nga naa moy isa ka table then with 20 colums..

    how do u construct a query that would select all 19 colums pero dili i.explicit ug apil sa query ang column name...

    in short "select * except a column" how to do this?

    Thanks guys in advance...
    LAZY CODES ARE BAD CODES!!!!!! :P

    No, it's not advisable. It will cause future problems with your table.
    Firstly, as a programmer or developer, you have to know all columns write them down and include them in your query and exclude the column you don't like to be part of your query.

    Code:
    SELECT c1,c2,     c4,c5,c6,c7
    FROM stupidtable
    WHERE blah blah AND BLAH BLAH and blah blah
    GROUP BY blah blah
    ORDER BY blah blah
    LIMIT blah blah
    If you create a special function or method that exclude your keyword from the query. It's possible.
    Last edited by dodie; 07-15-2009 at 12:31 PM.

  10. #10
    Quote Originally Posted by dodie View Post
    LAZY CODES ARE BAD CODES!!!!!! :P

    No, it's not advisable. It will cause future problems with your table.
    Firstly, as a programmer or developer, you have to know all columns write them down and include them in your query and exclude the column you don't like to be part of your query.
    i would not consider UtOkbOlinAO's post as a bad nor lazy.. i guess he's just looking for a simple approach in SQL's field of computing.. and since its not yet there, then maybe someone could push the idea - bring it to the public and say, "hey heroes! here's a new technique in querrying something like 'construct a query that would select all 19 colums pero dili i.explicit ug apil sa query ang column name' "....now that's computing..now that computer science!

  11.    Advertisement

Page 1 of 3 123 LastLast

Similar Threads

 
  1. Level-up games related queries... dito lang po
    By alexwafu in forum Networking & Internet
    Replies: 12
    Last Post: 06-10-2006, 07:36 PM
  2. Query on PSP pricing
    By EarlZ in forum Gizmos & Gadgets (Old)
    Replies: 16
    Last Post: 05-30-2006, 07:37 AM
  3. Monitor Power and other queries
    By Jacks in forum Computer Hardware
    Replies: 5
    Last Post: 05-20-2006, 08:42 AM
  4. QUERY ABOUT SATA MOTHERBOARDS
    By yori in forum Computer Hardware
    Replies: 3
    Last Post: 02-04-2006, 08:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top