Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在MySql中,我们可以使用文本作为字段吗?
MySql
SELECT (SELECT 'it_is_my_field_name_come_from_a_text') FROM my_table
SELECT 'it_is_my_field_come_from_a_text' FROM my_table ...
可以正常工作,也许您可以为其添加以下别名:
AS `My Field From Text`
因此,最终查询如下所示:
SELECT 'it_is_my_field_come_from_a_text' AS `My Field From Text` FROM my_table ...