當我們將 CONCAT_WS() 函數與 WHERE 子句一起使用時,輸出將基於 WHERE 子句中提供的條件。從‘Student’表格的範例可以理解如下
mysql> Select CONCAT_WS(' ',Name, Last_name, 'Resident of', Address, 'is studying', Subject)AS 'Student Detail' from student WHERE id = 20; +----------------------------------------------------------------+ | Student Detail | +----------------------------------------------------------------+ | Gaurav Rathore Resident of Jaipur is studying Computers | +----------------------------------------------------------------+ 1 row in set (0.00 sec)
以上是CONCAT_WS() 函數如何與 MySQL WHERE 子句一起使用?的詳細內容。更多資訊請關注PHP中文網其他相關文章!