You can use the information_schema columns table:
SELECT DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name="tbl_name" AND COLUMN_NAME = 'col_name';
More Related Contents:
- How can I speed up a MySQL query with a large offset in the LIMIT clause?
- How to import large sql file in phpmyadmin
- How to figure out size of Indexes in MySQL
- How do you force mysql LIKE to be case sensitive? [duplicate]
- MySQL Alter table causes Error: Invalid use of NULL value
- Delete all rows with timestamp older than x days
- MySQL – Cannot insert NULL value in column, but I have a default value specified?
- Xampp-mysql – “Table doesn’t exist in engine” #1932
- Unserialize through query at database level itself
- Detecting utf8 broken characters in MySQL
- How can I stop a MySQL query if it takes too long?
- MySQL throws Incorrect string value error
- “General error: 1005 Can’t create table” Using Laravel Schema Build and Foreign Keys
- Equivalent of MSSQL IDENTITY Column in MySQL
- #1060 – Duplicate column name ‘id’
- In what order are MySQL JOINs evaluated?
- Count duplicates records in Mysql table?
- Update multiple rows with multiple ‘where’ clauses for each individual row
- uninitialized constant MysqlCompat::MysqlRes (using mms2r gem)
- Migrating data into Firebase from MySQL
- ORDER BY alphabet first then follow by number
- Inventory management with stock options
- How to escape apostrophe (a single quote) in MySql?
- django cannot connect mysql in docker-compose
- WHERE datetime older than some time (eg. 15 minutes)
- mysql create table dynamically
- Is there a way to use ON DUPLICATE KEY to Update all that I wanted to insert?
- Failed to connect to mysql at 127.0.0.1:3306 with user root access denied for user ‘root’@’localhost'(using password:YES)
- Working with INTERVAL and CURDATE in MySQL
- Errno 121, duplicate key on write or update?