gpt4 book ai didi

mysql - SQL select AS - 前置文本

转载 作者:行者123 更新时间:2023-11-29 23:29:16 25 4
gpt4 key购买 nike

是否可以将文本添加到 SQL select 语句中。例如:

var query = "SELECT id, " +
"picture "
"FROM people";

var query = "SELECT id, " +
"picture AS './directory/' + picture "
"FROM people";

最佳答案

是的。像这样的事情:

  var query = "SELECT id, " +
"concat('./directory/',picture) AS picture "
"FROM people";

更多详细信息:http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat

关于mysql - SQL select AS - 前置文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26690223/

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