You are here: Re: server version « MsSQL Server « IT news, forums, messages
Re: server version

Posted by Erland Sommarskog on 12/29/06 22:41

Hugo Kornelis (hugo@perFact.REMOVETHIS.info.INVALID) writes:
> That depends on what is in the script. There is no length limit that I
> know of (there probably is SOME length limit, but so sky high that
> you'll never get to it for normal work). But there are some statements
> that have to run in a seperate batch.

And there are other statements that cannot be in the same batch, for
instance:

ALTER TABLE tbl ADD somenewcol int
UPDATE tbl SET somenewcol = 4711

This will fail to compile, since the new column does not exist when the
batch is compiled.

But this can be dealt with by putting such statments in EXEC().


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация