ZenCart 138 用命令mysql删除表 备用
2010年3月25日星期四 | | |今天改了一下ZC 的表前缀..为了方便以后用到..自己再备份一下,,有需要的哥们就拿去吧..共享无限出品:
上文提到改表前缀,这里顺便写一下删除以其它的,,有更新..
RENAME TABLE `address_book` TO `zc138_address_book`;
RENAME TABLE `address_format` TO `zc138_address_format`;
RENAME TABLE `admin` TO `zc138_admin`;
RENAME TABLE `admin_activity_log` TO `zc138_admin_activity_log`;
RENAME TABLE `authorizenet` TO `zc138_authorizenet`;
RENAME TABLE `banners` TO `zc138_banners`;
RENAME TABLE `banners_history` TO `zc138_banners_history`;
RENAME TABLE `categories` TO `zc138_categories`;
RENAME TABLE `categories_description` TO `zc138_categories_description`;
RENAME TABLE `configuration` TO `zc138_configuration`;
RENAME TABLE `configuration_group` TO `zc138_configuration_group`;
RENAME TABLE `counter` TO `zc138_counter`;
RENAME TABLE `counter_history` TO `zc138_counter_history`;
RENAME TABLE `countries` TO `zc138_countries`;
RENAME TABLE `coupons` TO `zc138_coupons`;
RENAME TABLE `coupons_description` TO `zc138_coupons_description`;
RENAME TABLE `coupon_email_track` TO `zc138_coupon_email_track`;
RENAME TABLE `coupon_gv_customer` TO `zc138_coupon_gv_customer`;
RENAME TABLE `coupon_gv_queue` TO `zc138_coupon_gv_queue`;
RENAME TABLE `coupon_redeem_track` TO `zc138_coupon_redeem_track`;
RENAME TABLE `coupon_restrict` TO `zc138_coupon_restrict`;
RENAME TABLE `currencies` TO `zc138_currencies`;
RENAME TABLE `customers` TO `zc138_customers`;
RENAME TABLE `customers_basket` TO `zc138_customers_basket`;
RENAME TABLE `customers_basket_attributes` TO `zc138_customers_basket_attributes`;
RENAME TABLE `customers_info` TO `zc138_customers_info`;
RENAME TABLE `customers_wishlist` TO `zc138_customers_wishlist`;
RENAME TABLE `db_cache` TO `zc138_db_cache`;
RENAME TABLE `email_archive` TO `zc138_email_archive`;
RENAME TABLE `ezpages` TO `zc138_ezpages`;
RENAME TABLE `featured` TO `zc138_featured`;
RENAME TABLE `files_uploaded` TO `zc138_files_uploaded`;
RENAME TABLE `geo_zones` TO `zc138_geo_zones`;
RENAME TABLE `get_terms_to_filter` TO `zc138_get_terms_to_filter`;
RENAME TABLE `group_pricing` TO `zc138_group_pricing`;
RENAME TABLE `languages` TO `zc138_languages`;
RENAME TABLE `layout_boxes` TO `zc138_layout_boxes`;
RENAME TABLE `manufacturers` TO `zc138_manufacturers`;
RENAME TABLE `manufacturers_info` TO `zc138_manufacturers_info`;
RENAME TABLE `media_clips` TO `zc138_media_clips`;
RENAME TABLE `media_manager` TO `zc138_media_manager`;
RENAME TABLE `media_to_products` TO `zc138_media_to_products`;
RENAME TABLE `media_types` TO `zc138_media_types`;
RENAME TABLE `meta_tags_categories_description` TO `zc138_meta_tags_categories_description`;
RENAME TABLE `meta_tags_products_description` TO `zc138_meta_tags_products_description`;
RENAME TABLE `music_genre` TO `zc138_music_genre`;
RENAME TABLE `newsletters` TO `zc138_newsletters`;
RENAME TABLE `nochex_apc_transactions` TO `zc138_nochex_apc_transactions`;
RENAME TABLE `nochex_sessions` TO `zc138_nochex_sessions`;
RENAME TABLE `orders` TO `zc138_orders`;
RENAME TABLE `orders_products` TO `zc138_orders_products`;
RENAME TABLE `orders_products_attributes` TO `zc138_orders_products_attributes`;
RENAME TABLE `orders_products_download` TO `zc138_orders_products_download`;
RENAME TABLE `orders_status` TO `zc138_orders_status`;
RENAME TABLE `orders_status_history` TO `zc138_orders_status_history`;
RENAME TABLE `orders_total` TO `zc138_orders_total`;
RENAME TABLE `paypal` TO `zc138_paypal`;
RENAME TABLE `paypal_payment_status` TO `zc138_paypal_payment_status`;
RENAME TABLE `paypal_payment_status_history` TO `zc138_paypal_payment_status_history`;
RENAME TABLE `paypal_session` TO `zc138_paypal_session`;
RENAME TABLE `paypal_testing` TO `zc138_paypal_testing`;
RENAME TABLE `products` TO `zc138_products`;
RENAME TABLE `products_attributes` TO `zc138_products_attributes`;
RENAME TABLE `products_attributes_download` TO `zc138_products_attributes_download`;
RENAME TABLE `products_description` TO `zc138_products_description`;
RENAME TABLE `products_discount_quantity` TO `zc138_products_discount_quantity`;
RENAME TABLE `products_notifications` TO `zc138_products_notifications`;
RENAME TABLE `products_options` TO `zc138_products_options`;
RENAME TABLE `products_options_types` TO `zc138_products_options_types`;
RENAME TABLE `products_options_values` TO `zc138_products_options_values`;
RENAME TABLE `products_options_values_to_products_options` TO `zc138_products_options_values_to_products_options`;
RENAME TABLE `products_to_categories` TO `zc138_products_to_categories`;
RENAME TABLE `product_music_extra` TO `zc138_product_music_extra`;
RENAME TABLE `product_types` TO `zc138_product_types`;
RENAME TABLE `product_types_to_category` TO `zc138_product_types_to_category`;
RENAME TABLE `product_type_layout` TO `zc138_product_type_layout`;
RENAME TABLE `project_version` TO `zc138_project_version`;
RENAME TABLE `project_version_history` TO `zc138_project_version_history`;
RENAME TABLE `query_builder` TO `zc138_query_builder`;
RENAME TABLE `record_artists` TO `zc138_record_artists`;
RENAME TABLE `record_artists_info` TO `zc138_record_artists_info`;
RENAME TABLE `record_company` TO `zc138_record_company`;
RENAME TABLE `record_company_info` TO `zc138_record_company_info`;
RENAME TABLE `reviews` TO `zc138_reviews`;
RENAME TABLE `reviews_description` TO `zc138_reviews_description`;
RENAME TABLE `salemaker_sales` TO `zc138_salemaker_sales`;
RENAME TABLE `sessions` TO `zc138_sessions`;
RENAME TABLE `specials` TO `zc138_specials`;
RENAME TABLE `tax_class` TO `zc138_tax_class`;
RENAME TABLE `tax_rates` TO `zc138_tax_rates`;
RENAME TABLE `template_select` TO `zc138_template_select`;
RENAME TABLE `upgrade_exceptions` TO `zc138_upgrade_exceptions`;
RENAME TABLE `whos_online` TO `zc138_whos_online`;
RENAME TABLE `zones` TO `zc138_zones`;
RENAME TABLE `zones_to_geo_zones` TO `zc138_zones_to_geo_zones`;
RENAME TABLE `address_format` TO `zc138_address_format`;
RENAME TABLE `admin` TO `zc138_admin`;
RENAME TABLE `admin_activity_log` TO `zc138_admin_activity_log`;
RENAME TABLE `authorizenet` TO `zc138_authorizenet`;
RENAME TABLE `banners` TO `zc138_banners`;
RENAME TABLE `banners_history` TO `zc138_banners_history`;
RENAME TABLE `categories` TO `zc138_categories`;
RENAME TABLE `categories_description` TO `zc138_categories_description`;
RENAME TABLE `configuration` TO `zc138_configuration`;
RENAME TABLE `configuration_group` TO `zc138_configuration_group`;
RENAME TABLE `counter` TO `zc138_counter`;
RENAME TABLE `counter_history` TO `zc138_counter_history`;
RENAME TABLE `countries` TO `zc138_countries`;
RENAME TABLE `coupons` TO `zc138_coupons`;
RENAME TABLE `coupons_description` TO `zc138_coupons_description`;
RENAME TABLE `coupon_email_track` TO `zc138_coupon_email_track`;
RENAME TABLE `coupon_gv_customer` TO `zc138_coupon_gv_customer`;
RENAME TABLE `coupon_gv_queue` TO `zc138_coupon_gv_queue`;
RENAME TABLE `coupon_redeem_track` TO `zc138_coupon_redeem_track`;
RENAME TABLE `coupon_restrict` TO `zc138_coupon_restrict`;
RENAME TABLE `currencies` TO `zc138_currencies`;
RENAME TABLE `customers` TO `zc138_customers`;
RENAME TABLE `customers_basket` TO `zc138_customers_basket`;
RENAME TABLE `customers_basket_attributes` TO `zc138_customers_basket_attributes`;
RENAME TABLE `customers_info` TO `zc138_customers_info`;
RENAME TABLE `customers_wishlist` TO `zc138_customers_wishlist`;
RENAME TABLE `db_cache` TO `zc138_db_cache`;
RENAME TABLE `email_archive` TO `zc138_email_archive`;
RENAME TABLE `ezpages` TO `zc138_ezpages`;
RENAME TABLE `featured` TO `zc138_featured`;
RENAME TABLE `files_uploaded` TO `zc138_files_uploaded`;
RENAME TABLE `geo_zones` TO `zc138_geo_zones`;
RENAME TABLE `get_terms_to_filter` TO `zc138_get_terms_to_filter`;
RENAME TABLE `group_pricing` TO `zc138_group_pricing`;
RENAME TABLE `languages` TO `zc138_languages`;
RENAME TABLE `layout_boxes` TO `zc138_layout_boxes`;
RENAME TABLE `manufacturers` TO `zc138_manufacturers`;
RENAME TABLE `manufacturers_info` TO `zc138_manufacturers_info`;
RENAME TABLE `media_clips` TO `zc138_media_clips`;
RENAME TABLE `media_manager` TO `zc138_media_manager`;
RENAME TABLE `media_to_products` TO `zc138_media_to_products`;
RENAME TABLE `media_types` TO `zc138_media_types`;
RENAME TABLE `meta_tags_categories_description` TO `zc138_meta_tags_categories_description`;
RENAME TABLE `meta_tags_products_description` TO `zc138_meta_tags_products_description`;
RENAME TABLE `music_genre` TO `zc138_music_genre`;
RENAME TABLE `newsletters` TO `zc138_newsletters`;
RENAME TABLE `nochex_apc_transactions` TO `zc138_nochex_apc_transactions`;
RENAME TABLE `nochex_sessions` TO `zc138_nochex_sessions`;
RENAME TABLE `orders` TO `zc138_orders`;
RENAME TABLE `orders_products` TO `zc138_orders_products`;
RENAME TABLE `orders_products_attributes` TO `zc138_orders_products_attributes`;
RENAME TABLE `orders_products_download` TO `zc138_orders_products_download`;
RENAME TABLE `orders_status` TO `zc138_orders_status`;
RENAME TABLE `orders_status_history` TO `zc138_orders_status_history`;
RENAME TABLE `orders_total` TO `zc138_orders_total`;
RENAME TABLE `paypal` TO `zc138_paypal`;
RENAME TABLE `paypal_payment_status` TO `zc138_paypal_payment_status`;
RENAME TABLE `paypal_payment_status_history` TO `zc138_paypal_payment_status_history`;
RENAME TABLE `paypal_session` TO `zc138_paypal_session`;
RENAME TABLE `paypal_testing` TO `zc138_paypal_testing`;
RENAME TABLE `products` TO `zc138_products`;
RENAME TABLE `products_attributes` TO `zc138_products_attributes`;
RENAME TABLE `products_attributes_download` TO `zc138_products_attributes_download`;
RENAME TABLE `products_description` TO `zc138_products_description`;
RENAME TABLE `products_discount_quantity` TO `zc138_products_discount_quantity`;
RENAME TABLE `products_notifications` TO `zc138_products_notifications`;
RENAME TABLE `products_options` TO `zc138_products_options`;
RENAME TABLE `products_options_types` TO `zc138_products_options_types`;
RENAME TABLE `products_options_values` TO `zc138_products_options_values`;
RENAME TABLE `products_options_values_to_products_options` TO `zc138_products_options_values_to_products_options`;
RENAME TABLE `products_to_categories` TO `zc138_products_to_categories`;
RENAME TABLE `product_music_extra` TO `zc138_product_music_extra`;
RENAME TABLE `product_types` TO `zc138_product_types`;
RENAME TABLE `product_types_to_category` TO `zc138_product_types_to_category`;
RENAME TABLE `product_type_layout` TO `zc138_product_type_layout`;
RENAME TABLE `project_version` TO `zc138_project_version`;
RENAME TABLE `project_version_history` TO `zc138_project_version_history`;
RENAME TABLE `query_builder` TO `zc138_query_builder`;
RENAME TABLE `record_artists` TO `zc138_record_artists`;
RENAME TABLE `record_artists_info` TO `zc138_record_artists_info`;
RENAME TABLE `record_company` TO `zc138_record_company`;
RENAME TABLE `record_company_info` TO `zc138_record_company_info`;
RENAME TABLE `reviews` TO `zc138_reviews`;
RENAME TABLE `reviews_description` TO `zc138_reviews_description`;
RENAME TABLE `salemaker_sales` TO `zc138_salemaker_sales`;
RENAME TABLE `sessions` TO `zc138_sessions`;
RENAME TABLE `specials` TO `zc138_specials`;
RENAME TABLE `tax_class` TO `zc138_tax_class`;
RENAME TABLE `tax_rates` TO `zc138_tax_rates`;
RENAME TABLE `template_select` TO `zc138_template_select`;
RENAME TABLE `upgrade_exceptions` TO `zc138_upgrade_exceptions`;
RENAME TABLE `whos_online` TO `zc138_whos_online`;
RENAME TABLE `zones` TO `zc138_zones`;
RENAME TABLE `zones_to_geo_zones` TO `zc138_zones_to_geo_zones`;
顺便说一下方法:
步骤:
去phpmyadmin 里把表头复制到.txt文档 => 把.txt文档里的内容复制到.xls的Excel里去 =>把没用的字段列删除=>分别添加字段:
RENAME TABLE `
` TO `
zc138_zones_to_geo_zones(这里只是举例,应用的时候改成你想要的表名即可)
`;
以形成:RENAME TABLE `zones_to_geo_zones` TO `zc138_zones_to_geo_zones`;
以形成:RENAME TABLE `zones_to_geo_zones` TO `zc138_zones_to_geo_zones`;
我剪个图大家看的更明白些:如下图
=>从.xls的Excel里复制到.txt 文档上面去 =>进行去空格处理 => OK了 恭喜你 完成了.得到你想要的了..
以上是改.同样删除表也可以同理而得哦..大家应该学会举一反三.
DROP TABLE `address_book`;
DROP TABLE `address_format`;
DROP TABLE `admin`;
DROP TABLE `admin_activity_log`;
DROP TABLE `authorizenet`;
DROP TABLE `banners`;
DROP TABLE `banners_history`;
DROP TABLE `categories`;
DROP TABLE `categories_description`;
DROP TABLE `configuration`;
DROP TABLE `configuration_group`;
DROP TABLE `counter`;
DROP TABLE `counter_history`;
DROP TABLE `countries`;
DROP TABLE `coupons`;
DROP TABLE `coupons_description`;
DROP TABLE `coupon_email_track`;
DROP TABLE `coupon_gv_customer`;
DROP TABLE `coupon_gv_queue`;
DROP TABLE `coupon_redeem_track`;
DROP TABLE `coupon_restrict`;
DROP TABLE `currencies`;
DROP TABLE `customers`;
DROP TABLE `customers_basket`;
DROP TABLE `customers_basket_attributes`;
DROP TABLE `customers_info`;
DROP TABLE `customers_wishlist`;
DROP TABLE `db_cache`;
DROP TABLE `email_archive`;
DROP TABLE `ezpages`;
DROP TABLE `featured`;
DROP TABLE `files_uploaded`;
DROP TABLE `geo_zones`;
DROP TABLE `get_terms_to_filter`;
DROP TABLE `group_pricing`;
DROP TABLE `languages`;
DROP TABLE `layout_boxes`;
DROP TABLE `manufacturers`;
DROP TABLE `manufacturers_info`;
DROP TABLE `media_clips`;
DROP TABLE `media_manager`;
DROP TABLE `media_to_products`;
DROP TABLE `media_types`;
DROP TABLE `meta_tags_categories_description`;
DROP TABLE `meta_tags_products_description`;
DROP TABLE `music_genre`;
DROP TABLE `newsletters`;
DROP TABLE `nochex_apc_transactions`;
DROP TABLE `nochex_sessions`;
DROP TABLE `orders`;
DROP TABLE `orders_products`;
DROP TABLE `orders_products_attributes`;
DROP TABLE `orders_products_download`;
DROP TABLE `orders_status`;
DROP TABLE `orders_status_history`;
DROP TABLE `orders_total`;
DROP TABLE `paypal`;
DROP TABLE `paypal_payment_status`;
DROP TABLE `paypal_payment_status_history`;
DROP TABLE `paypal_session`;
DROP TABLE `paypal_testing`;
DROP TABLE `products`;
DROP TABLE `products_attributes`;
DROP TABLE `products_attributes_download`;
DROP TABLE `products_description`;
DROP TABLE `products_discount_quantity`;
DROP TABLE `products_notifications`;
DROP TABLE `products_options`;
DROP TABLE `products_options_types`;
DROP TABLE `products_options_values`;
DROP TABLE `products_options_values_to_products_options`;
DROP TABLE `products_to_categories`;
DROP TABLE `product_music_extra`;
DROP TABLE `product_types`;
DROP TABLE `product_types_to_category`;
DROP TABLE `product_type_layout`;
DROP TABLE `project_version`;
DROP TABLE `project_version_history`;
DROP TABLE `query_builder`;
DROP TABLE `record_artists`;
DROP TABLE `record_artists_info`;
DROP TABLE `record_company`;
DROP TABLE `record_company_info`;
DROP TABLE `reviews`;
DROP TABLE `reviews_description`;
DROP TABLE `salemaker_sales`;
DROP TABLE `sessions`;
DROP TABLE `specials`;
DROP TABLE `tax_class`;
DROP TABLE `tax_rates`;
DROP TABLE `template_select`;
DROP TABLE `upgrade_exceptions`;
DROP TABLE `whos_online`;
DROP TABLE `zones`;
DROP TABLE `zones_to_geo_zones`;
此文结束. 有更新的话..我会自动添加内容.欢迎再造访.
谢谢您的批阅. 本文大家如果喜欢可以任意转载,转载请注明出处,,谢谢合作!
谢谢光临本站: http://home.benz.la 共享无限.. 转载请注明出处..
我的QQ空间
如何通过SQL实现对数据表的字段更名
SQL帮助文档中提供了重命名列的方法,下边整理如下:下例将表 cu...