DESCRIBE in the FROM subquery

Is it possible for a DESCRIBE table clause to be inserted as a subquery in FROM from a SELECT clause in MySQL?

Also, is there a way to enforce the WHERE clause on the DESCRIBE output?

EDIT: Basically, I have a table with a lot of columns, and I want to pull and process the data of only one column.

+3
source share
1 answer

you can use INFORMATION_SCHEMA instead of the following:

SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'Database Name'
AND TABLE_NAME = 'Table Name' and any condition you want...;
+3
source

Source: https://habr.com/ru/post/1715606/


All Articles