Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Database Access / July 2008



Tip: Looking for answers? Try searching our database.

Select in SQL server

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
emmim44 - 30 Jul 2008 15:15 GMT
Can someone explain this ( Select TOP 40  * ) in plain english ?

SELECT     TOP 40  *, convert(varchar, CreateDate, 101) AS ShortDate
Azadi - 30 Jul 2008 16:10 GMT
SELECT TOP 40 = select data from first 40 rows only

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
paross1 - 30 Jul 2008 16:33 GMT
SQL Server BOL is your friend.....

[i]The TOP clause limits the number of rows returned in the result set.

TOP n [PERCENT]

n specifies how many rows are returned. If PERCENT is not specified, n is the
number of rows to return. If PERCENT is specified, n is the percentage of the
result set rows to return:

TOP 120 /*Return the top 120 rows of the result set. */
TOP 15 PERCENT /* Return the top 15% of the result set. */.

If a SELECT statement that includes TOP also has an ORDER BY clause, the rows
to be returned are selected from the ordered result set. The entire result set
is built in the specified order and the top n rows in the ordered result set
are returned.[/i]

Phil
emmim44 - 30 Jul 2008 16:45 GMT
Niceeee... Thank dudes.
emmim44 - 30 Jul 2008 16:46 GMT
Niceeee... Thank dudes.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.