Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question on Union All
Message
From
22/03/2010 02:23:05
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Question on Union All
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01455995
Message ID:
01455995
Views:
163
I have this SQL and I cannot understand why it returns 11 rows when there is a TOP 10 syntax:
DECLARE @Enabled Bit
DECLARE @Public Bit
DECLARE @Public2 Bit

SET @Enabled=1
SET @Public=1
SET @Public2=1

SELECT TOP 10 Class.Title,Class.Notes,Class.AddDate,Class.ModDate,Class.Numero
 FROM Class
 UNION ALL
 SELECT ClassMethod.Title,ClassMethod.Notes,ClassMethod.AddDate,ClassMethod.ModDate,ClassMethod.Numero 
  FROM ClassMethod
  ORDER BY AddDate DESC
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform