當(dāng)我們將 CONCAT_WS() 函數(shù)與 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)
登錄后復(fù)制
以上就是CONCAT_WS() 函數(shù)如何與 MySQL WHERE 子句一起使用?的詳細(xì)內(nèi)容,更多請關(guān)注www.92cms.cn其它相關(guān)文章!