SELECT column_name,data_type, character_maximum_length
FROM information_schema.columns
WHERE table_name   = '<your table name>'

This command usually works in many database engines.