开发者

Including initial value in a select Statement

开发者 https://www.devze.com 2022-12-16 09:31 出处:网络
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 hardcod

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

精彩评论

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