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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 small SQL Querying question

Author  Topic 

masterdineen
Aged Yak Warrior

550 Posts

Posted - 2007-11-16 : 09:59:52
I am learning about SQL Server 2005 and the SQL lanquage

Just want to know

what does the "GO" do when used within a query see below

USE [AdventureWorks]
GO
ALTER INDEX [AK_Contact_rowguid] ON [Person].[Contact]
REORGANIZE WITH ( LOB_COMPACTION = ON )
GO
USE [AdventureWorks]
GO
ALTER INDEX [IX_Contact_EmailAddress] ON
[Person].[Contact] REORGANIZE WITH (
LOB_COMPACTION = ON )
GO
USE [AdventureWorks]
GO
ALTER INDEX [PK_Contact_ContactID] ON
[Person].[Contact] REORGANIZE WITH (
LOB_COMPACTION = ON )

Many thanks

I am learning for my MCTS so any hint or tips if you have any please

Rob

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-11-16 : 10:05:36
if you are learning about SQL Server, the first thing you should know is refer to the Books OnLine when you have doubt.

What does the Books Online tell you about GO ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

masterdineen
Aged Yak Warrior

550 Posts

Posted - 2007-11-16 : 10:12:57
ok thank you, i forget about books online

Rob
Go to Top of Page
   

- Advertisement -