-
Plz help me with select statment
Hi friend i am new to sql and facing problem in writing select queries
Plz help me know how sql query gets data from server , i am unable to understand the flow of query , i could not make out which part of query is executed first.
chk this case:-
select top 3 with ties ProductName,UnitsOnOrder from Products order by UnitsOnOrder desc
1) As per me it executes left to right .First it select top 3 records from products table then order them and then arrange then in descending order
but results i am getting are different
so please help me logically understand how above select statement works
-
Sql sorts table first then pick up top 3.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|