我有一个保存产品信息的 SQL 数据库,包括产品的名称和描述。
它目前的设置方式是这样的:
+-------------+-------------+------------------+--------------------------------+
| products_id | language_id | products_name | products_description |
+-------------+-------------+------------------+--------------------------------+
| 1 | 1 | A19845002 | CONE DRIVE ASSEMBLY |
| 1 | 2 | A19845002 | CONE DRIVE ASSEMBLY |
| 4619 | 1 | A51959001 | CONE DRIVE SPACER |
| 4619 | 2 | A51959001 | CONE DRIVE SPACER |
| 13600 | 1 | A18535004 | CONE DRIVE UNIT |
| 13600 | 2 | A18535004 | CONE DRIVE UNIT |
| 13701 | 1 | A17236001GEARSET | CONE DRIVE GEARSET |
| 13701 | 2 | A17236001GEARSET | CONE DRIVE GEARSET |
| 14388 | 1 | A18535003 | CONE DRIVE UNIT |
| 14388 | 2 | A18535003 | CONE DRIVE UNIT |
| 14389 | 1 | A18535002 | CONE DRIVE UNIT |
| 14389 | 2 | A18535002 | CONE DRIVE UNIT |
| 14390 | 1 | A18535001 | CONE DRIVE UNIT |
| 14390 | 2 | A18535001 | CONE DRIVE UNIT |
| 14727 | 1 | A19346006 | CONE DRIVE SPEED REDUCER |
| 14727 | 2 | A19346006 | CONE DRIVE SPEED REDUCER |
| 14859 | 1 | A18957002 | CONE DRIVE GEARMOTOR UNIT |
| 14859 | 2 | A18957002 | CONE DRIVE GEARMOTOR UNIT |
| 14867 | 1 | 604037 | CONE DRIVE GEARMOTOR |
| 14867 | 2 | 604037 | CONE DRIVE GEARMOTOR |
| 15182 | 1 | A17236001 | CONE DRIVE UNIT SM-502000-AJ |
| 15182 | 2 | A17236001 | CONE DRIVE UNIT SM-502000-AJ |
| 15410 | 1 | A19346004 | CONE DRIVE WORM REDUCER |
| 15410 | 2 | A19346004 | CONE DRIVE WORM REDUCER |
| 15751 | 1 | 604036 | CONE DRIVE GEARMOTOR 2.75 BORE |
| 15751 | 2 | 604036 | CONE DRIVE GEARMOTOR 2.75 BORE |
| 15752 | 1 | 604035 | MSR 50 CONE DRIVE GEARMOTOR |
| 15752 | 2 | 604035 | MSR 50 CONE DRIVE GEARMOTOR |
| 15842 | 1 | A19346005 | CONE DRIVE WORM REDUCER |
| 15842 | 2 | A19346005 | KEGELRÄDER WORM REDUCER |
+-------------+-------------+------------------+--------------------------------+
products_description
当它相同products_id
但不同时,它想通过并找出不同的地方language_id
。(1 应该是英语,2 应该是德语)。如果我对此运行查询,我希望有一个简单的方法来找到 CONE DRIVE WORM REDUCER/KEGELRÄDER WORM REDUCER(所以product_id
or product_name
)。
我将如何使用 mysql 执行此操作?我真的不习惯做很多数据库的事情,但我需要找出这些产品中的任何一个是否得到了适当的处理。