首頁  >  文章  >  資料庫  >  CONCAT_WS() 函數如何與 MySQL WHERE 子句一起使用?

CONCAT_WS() 函數如何與 MySQL WHERE 子句一起使用?

WBOY
WBOY轉載
2023-09-15 13:57:05968瀏覽

CONCAT_WS() 函数如何与 MySQL WHERE 子句一起使用?

當我們將 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中文網其他相關文章!

陳述:
本文轉載於:tutorialspoint.com。如有侵權,請聯絡admin@php.cn刪除