MySql SHOW COLUMNS, how do I see results?

Discussion in 'Databases' started by progman, Feb 17, 2020.

  1. How do I see results of one of my MySql tables with "SHOW COLUMNS"?
    ( It is obvious if I had mysql and my database installed on my local PC.
    https://dev.mysql.com/doc/refman/8.0/en/show-columns.html )

    Trying to see my field definitions of an existing table I have.

    I have been trying to do a "show columns" programmatically, but could not figure out how to get the "result set" similar to "select" of my table's data. Am I on the right track here, or is there an easier way to see the field definitions of my table I already am doing "select" statements on?
     
    Last edited: Feb 17, 2020
  2. Trying to see my field definitions of an existing table I have ...
     
  3. Elshadriel

    Elshadriel Winhost Staff

    Are you using MySQL WorkBench or phpMyAdmin? Or are you just doing it from the MySQL command line? The syntax is simply:

    Code:
    SHOW COLUMNS FROM mytable FROM mydb;
    
     

Share This Page