Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rajeshskpm
Starting Member
10 Posts |
Posted - 2009-01-30 : 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
600 Posts |
Posted - 2009-01-30 : 04:56:18
|
by default it returns 1 and 2 values for table |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-01-30 : 04:56:53
|
1,2 values as how many rows in ur table that many rows u will get |
|
|
Nageswar9
Aged Yak Warrior
600 Posts |
Posted - 2009-01-30 : 04:56:54
|
declare @temp table ( date datetime,price int )insert into @tempselect '1/1/2009',10 union allselect '3/1/2009',15 union allselect '5/1/2009',20 union allselect '7/1/2009',25 select 1,2 from @temp |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-01-30 : 05:12:44
|
wt is the use of giving dynamically 1,2 values from tablename |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2009-01-30 : 05:42:01
|
Laziness. |
|
|
|
|
|