1

In postgres, whenever I want to print a description of a query, I could add \gdesc as follows:

# select 1 as num \gdesc
 Column |  Type   
--------+---------
 num    | integer
(1 row)

I was wondering if there's an equivalent in MySQL (or in any other relational database).

I'm aware of DESCRIBE Table, but I'm looking to describe a query, not a table.

Eliya Cohen
  • 10,716
  • 13
  • 59
  • 116
  • 2
    It is a command-line feature and has nothing to do with SQL. Each DBMS has its own cli and, well, it's a very specific use case (generally there's some IDE that depicts datatypes in UI) – astentx Sep 05 '22 at 09:31
  • @astentx I'm aware of that it's a CLI command, but I wasn't sure how to exactly call it. My question was if there's an equivalent in some way in other DBMS – Eliya Cohen Sep 05 '22 at 09:55
  • The datatypes system in MySQL is soft, so trying to determine the data type of a column precisely doesn't make sense. – Akina Sep 05 '22 at 10:02

0 Answers0