[SQL Server] selecting same columns |
Posted: 22 Jun 2013 01:00 AM PDT Hi All - I have come across a query in a site like below:if OBJECT_ID('tempdb..#t1') is not nulldrop table #t1SELECT TOP 11000 IDENTITY(INT,1,1) AS N INTO #t1 FROM Master.dbo.SysColumns sc1, Master.dbo.SysColumns sc2I have a doubt on the part: FROM Master.dbo.SysColumns sc1, Master.dbo.SysColumns sc2 - How it works? what is the logic behind this?I tried to select like: select * from Master.dbo.SysColumns sc1, Master.dbo.SysColumns sc2 - seems endless loop. Is it so? Can someone please clarify how it works. Thanks! |
You are subscribed to email updates from SQLServerCentral / SQL Server 2008 / SQL Server Newbies To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
No comments:
Post a Comment