will be any problem with my website if I empty all the cache tables from Database? I'm trying to move my website from localhost to a server. the size of DB is too big and from what I saw the cache tables have big size. is there any problem (for my localhost version of site) if I empty all of them? (specially cache_form)

besides that when I was trying to import the DB into server the server reported an error when it was inserting cache_views table; it is very important for me to empty this table to avoid insertion error in the future.

thanks
As per the drupal community doc for clearing the cache you can manually TRUNCATE the tables (empty, not remove) starting with cache_ and there shouldn't be any problem doing so as on visiting any page the cache is rebuilt.

However I would recommend to either use the drush, or clear the cache from the /admin/config/development/performance page.

If you want to clear the cache from code than you may try the following:

// clear cache
drupal_flush_all_caches();


Also its always safe to keep the Backup of database before making any manual operation on database.