让我们说我有两个表格,Skus和商品名。
SKU
+-------+-------------+
| SKU | Description |
+-------+-------------+
| D1234 | Circle Red |
| D1235 | Circle Blue |
| D1236 | Square Red |
| D1237 | Square Blue |
+-------+-------------+
商品名
+-----------+-------------------+
| Tradename | Product Manual |
+-----------+-------------------+
| Circle | All about circles |
| Square | Squares 101 |
+-----------+-------------------+
我想要
+-------+-------------+-----------+-------------------+
| Sku | Description | Tradename | Manual |
+-------+-------------+-----------+-------------------+
| D1234 | Circle Red | Circle | All about Circles |
| D1235 | Circle Blue | Circle | All about Circles |
| D1236 | Square Red | Square | Squares 101 |
| D1237 | Square Blue | Square | Squares 101 |
+-------+-------------+-----------+-------------------+
,但是它们之间没有完全相同的实际标识符。 有没有一种方法可以使用LIKE联接表?
答案 0 :(得分:1)
您可以使用npm version patch -m "Upgrade to %s for reasons"
或like
:
instr()
答案 1 :(得分:1)
您可以在此处使用LIKE
SELECT
s.SKU,
s.Description,
t.Tradename,
t.Manual
FROM SKU s
INNER JOIN Tradenames t
ON s.Description LIKE "*" & t.Tradename & "*";