开发者

Including initial value in a select Statement

I have a select query which returns the following o/p.. 1 Arun, 2 Kumar, 3 Babu, 4 Ram,

Is it possible to add a intial value to this o/p without inserting a value to the table, in other means hardcoding the intial valu开发者_StackOverflow中文版e. Can i get the o/p as

0 Select, 1 Arun, 2 Kumar, 3 Babu, 4 Ram


Try this:

select 
    0, 
   'Select'
union all
<your query>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜