I want to drop a field from db table which is named as read. I tried like;
db_drop_field('my_table', 'read'); db_drop_field('my_table', '`read`'); db_drop_field('my_table', `read`);
None of these work.
Just run a custom query:
db_query('ALTER TABLE my_table DROP COLUMN `read`');
The API functions don't cover every possible edge case, and dropping fields named as reserved words happens to be one of them.
When that fails, executing a standard SQL query is the best option.
Read is a reserved word, but your problem has an easy solution (I test it and works)
Change your field name to reading
And then use: