贴心
全国7×24小时客服热线
安全
病毒杀除率高于99%
稳定
网站可用性高于99.9%
实力
服务68家上市企业及集团公司
点击数:10592015-07-19 17:35:45 来源: 外贸网站建设,深圳外贸网站建设,深圳网站建设,外贸商城网站制作-亿恩科技
首先备份整个数据库是个好习惯。
1.查找包含有products_id字段的数据表。
1
|
select table_schema, table_name, column_name
|
2
|
from information_schema.columns
|
3
|
where column_name = 'products_id'
|
4
|
and table_schema = 'your-db-name'
|
5
|
order by table_name;
|
2. 找到要删除的products_id。
1
|
create table _products_id_del
|
2
|
as
|
3
|
select pd.products_id, pd.products_name
|
4
|
from products_description pd
|
5
|
inner join products_to_categories pc
|
6
|
on pd.products_id = pc.products_id
|
|