网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 服务器与数据库 > MySQL
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

Reply
 
Thread Tools Display Modes
  #1   IP: 204.45.15.210
Old 2015-12-19, 10:50 PM
Kaibito Kaibito is offline
初级会员
 
Join Date: 2009-10-21
Posts: 1
Kaibito 现在声名狼藉
Default I need to delete all data in a single field from 300 tables

I have an ecommerce store that I am currently working on and there are approx 300 products which have a field named "product_id" at www.prescription-glasses.com database.

These fields contains an old product_id that I need to delete altogether.

How can I create a query that will replace all "product_id" fields with data in them with a null value?

Last edited by topvip : 2015-12-19 at 10:54 PM
Reply With Quote
  #2   IP: 204.45.15.210
Old 2015-12-19, 10:53 PM
Lakeville Lakeville is offline
初级会员
 
Join Date: 2013-03-06
Posts: 1
Lakeville 现在声名狼藉
Default

This will set every product_id to NULL which is currently not null.
Code:
UPDATE table_name
SET product_id= NULL
WHERE product_id is not null;
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Display product extra field data on Invoice Hahira X-Cart 0 2015-12-02 06:47 PM
Magento: How to delete/remove all products from all categories Random Lake Magento 0 2015-04-24 04:37 AM
mysql 帮助文档使用 Haddam MySQL 0 2014-11-26 06:43 PM
PayPal 出错处理 Queen 电子商务 2 2014-11-15 11:03 AM

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 03:47 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.