#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    13
    Rep Power
    0

    How to find columns defined as SMALLINT


    I'm new at using MYSQL so please forgive me if this should be obvioUs. How would you construct a query to find columns that are defined as SMALLINT?
    Thanks in advance for any guidance provided.
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,959
    Rep Power
    1014
    Hi,

    meta data for tables, columns etc. is available through the INFORMATION_SCHEMA database:

    http://dev.mysql.com/doc/refman/5.5/...mns-table.html

    However, when you find yourself fumbling with the INFORMATION_SCHEMA, it's usually a sign that you're really, really on the wrong track -- unless you write a database adminstration system like phpmyadmin. What exactly do you need this for?
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    13
    Rep Power
    0

    Information Schema


    It was an exercise in a tutorial, but I figured it out.

IMN logo majestic logo threadwatch logo seochat tools logo