SELECT column_name FROM information_schema.columns WHERE table_schema = 'yourdb' AND table_name = 'tablename';
Just edit the bold parts above, it's great when coding database applications and saves a bit of time.