Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24

Thread: Query

  1. #21

    Quote Originally Posted by UtOkbOlinAO View Post
    yup, naa nani solution...

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

    from this QUERY makuha na ang solution ani... kamo na bahala kung unsa inyong paagi...


    kung performance sa query ang basihan, this is not good...

    you are querying more than 4 tables with your approach than specifying the column name lang.

    user_tab_columns is a view, daghan na nga table ang gi-basihan (consist of system tables). just check it out...

    mas better gyud nga specify lang nimo tanan column name.


    even these people are also specifying columnames sa ilang mga query:
    -Steven Feuerstein
    -Tom Kyte


    hinaot ko makatabang ko gamay...

  2. #22
    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.

    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.
    there are instances where in you don't have the column names or the table names... this are cases where in you are only provided the server and a password.

    first thing you do, get all database, get all tables, after that query all columns in that table. etc etc...
    i dont find it lazy it just depends on the needs, what if your creating a db utility?

  3. #23
    Quote Originally Posted by silent-kill View Post
    there are instances where in you don't have the column names or the table names... this are cases where in you are only provided the server and a password.

    first thing you do, get all database, get all tables, after that query all columns in that table. etc etc...
    i dont find it lazy it just depends on the needs, what if your creating a db utility?

    What kind of instances? If you have the server info and password, then you have the column names.

    What kind of DB utility? I might be convinced if there's really a real-world scenario for this.

  4. #24
    Quote Originally Posted by simoncpu View Post
    What kind of instances? If you have the server info and password, then you have the column names.

    What kind of DB utility? I might be convinced if there's really a real-world scenario for this.
    lots and lots, a my coworker created a 'utility' to find certain databases on certain servers. in our company we manage lots of databases with lots of server. he doesnt want to go to each dns or server and search for it.

    back in college, i was a bit curious, and started stealing passwords from an unsecured shared hosting lol.
    i made myself, a file system utility (to browse his dir and luckily i found his db login in a php file lol.) and a db utility and a 'query analyzer'. the phpmyadmin address was protected with a different user authentication.

    http://img27.imageshack.us/img27/3677/sometest.jpg

    so there is lots, of scenario i can think of right now, just depends on a situation.
    Last edited by silent-kill; 07-29-2009 at 07:32 AM.

  5.    Advertisement

Page 3 of 3 FirstFirst 123

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