mysql *带前置自定义列的选择 [英] mysql * selection with prepended custom columns
本文介绍了mysql *带前置自定义列的选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有一种方法可以在使用*列选择的列之前添加特定的自定义列/消息? 这很好.
Is there a way to add specific custom columns/messages before the columns selected using * columns? This works fine.
从rrc中选择 *,'User_Msg_1';
而我需要这样的东西
从rrc中选择'User_Msg_1',* ;
推荐答案
使用rrc.*
:
SELECT 'User_Msg_1', rrc.* FROM rrc;
或在关系{("User_Msg_1")}上创建笛卡尔积:
or make a cartesian product on the relation {("User_Msg_1")}:
SELECT * FROM (SELECT 'User_Msg_1' FROM DUAL), rrc
这篇关于mysql *带前置自定义列的选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文