有没有一种简单的方法可以将数字“2”添加到 MySQL SELECT STATEMENT。我不断收到错误消息。
SELECT field_name AS '2' + field_name from table_data as tbl
left join another_table as ic on ic.id = tbl.provider " .
where pid = '3' and type = "secondary" order by date DESC limit 1
最佳答案
试试这个:
SELECT field_name + 2
FROM table_data AS tbl
LEFT JOIN another_table AS ic ON ic.id = tbl.provider
WHERE pid = '3' AND TYPE = "secondary"
ORDER BY DATE DESC LIMIT 1
关于mysql - 向 SELECTED 字段名称 mysql 添加一个数字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24690123/