문제

I have a task to list the column names with the data type tiny int. I used SHOW COLUMNS but I would like to use the results to make a field in my form based on the show columns result.

도움이 되었습니까?

해결책

Try this:

SELECT COLUMN_NAME 
FROM information_schema.COLUMNS 
WHERE TABLE_SCHEMA = 'dbName' AND TABLE_NAME = 'tableName' AND 
        LOWER(DATA_TYPE) = 'tinyint'
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top