gpt4 book ai didi

mysql - 列数据MYSQL中的未知字符

转载 作者:可可西里 更新时间:2023-11-01 07:45:38 27 4
gpt4 key购买 nike

<分区>

其中一列似乎在数据前面有某种特殊字符。当我运行此查询时:

SELECT *  FROM `stocktake_products` WHERE `stocktake_id` = 4148 AND `stocktake_product_id` = '29153796'

我没有得到任何结果,但是运行这个:

SELECT *  FROM `stocktake_products` WHERE `stocktake_id` = 4148 AND `stocktake_product_id` LIKE '29153796'

我正在使用这个字段来 LEFT JOIN 另一个表(

SELECT
*
FROM stocktake_scans ss
LEFT JOIN stocktake_products sp ON ss.stocktake_product_id = sp.stocktake_product_id
LEFT JOIN stocktake_staff st ON ss.stocktake_staff_id = st.stocktake_staff_id
LEFT JOIN stocktake_areas sa ON ss.stocktake_area_id = sa.stocktake_area_id
WHERE ss.stocktake_id = X
ORDER BY stocktake_scan_id ASC;

) 所以我确实需要使用 "=" 语法而不是 LIKE

获取正确的产品。我已尝试 TRIM(stocktake_product_id)0 行已更新。有没有其他方法可以找出那个特殊的、不可见的字符是什么并将其删除?

谢谢!

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com