mardi 19 juillet 2016

In MySQL how to get the subset of a table ,having only those columns which are of numeric type?

SHOW COLUMNS FROM country ;

Shows information about all the columns in country and its dataTypes.

But following command gives error

SELECT* COLUMNS FROM country where TYPE = INT;

Error:- /* SQL Error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLUMNS FROM country where TYPE= INT' at line 1 */

What is the right way to do it ?

Aucun commentaire:

Enregistrer un commentaire