| Author |
Topic  |
|
|
rajeshskpm
Starting Member
India
10 Posts |
Posted - 01/30/2009 : 04:52:50
|
suppose one table named 'emp'.
what will be the opt of below query?
select 1,2 from emp order by 1
[1,2 are not table columns]
rajesh |
|
|
Nageswar9
Aged Yak Warrior
India
600 Posts |
Posted - 01/30/2009 : 04:56:18
|
| by default it returns 1 and 2 values for table |
 |
|
|
bklr
Flowing Fount of Yak Knowledge
India
1693 Posts |
Posted - 01/30/2009 : 04:56:53
|
1,2 values as how many rows in ur table that many rows u will get |
 |
|
|
Nageswar9
Aged Yak Warrior
India
600 Posts |
Posted - 01/30/2009 : 04:56:54
|
declare @temp table ( date datetime,price int ) insert into @temp select '1/1/2009',10 union all select '3/1/2009',15 union all select '5/1/2009',20 union all select '7/1/2009',25
select 1,2 from @temp |
 |
|
|
bklr
Flowing Fount of Yak Knowledge
India
1693 Posts |
Posted - 01/30/2009 : 05:12:44
|
wt is the use of giving dynamically 1,2 values from tablename |
 |
|
|
RickD
Slow But Sure Yak Herding Master
United Kingdom
3560 Posts |
Posted - 01/30/2009 : 05:42:01
|
| Laziness. |
 |
|
| |
Topic  |
|