hi,
probably you will find better ANSI compliance if you move to SQLExpress, the
free edition of SQL Server 2005..
anyway..
[quoted text, click to view] Gold Panther wrote:
> I have a database, and I want to run an update script on it. I
> understand ANSI standard script. I've used Oracle 10g to learn
> databases, and I've used C# for a while now with SQLCommand,
> SQLConnection, etc. Now, I'm trying to update a SQL Server (I want to
> say 2003 Compact...not sure). I have the script that attached this
> database. It's biggest change in the actual running of script is
> using GO, and it also doesn't have semi-colons at the end of
> statements.
GO is not a SQL keyword.. it's just a batch terminator used in some
interactive tools like Enterprise Manager, Quary Analyzer, SQL Server
Management Studio, oSql.exe, SqlCMD.exe...
as these are the "official" tools provided by Microsoft, GO has become the
"standard" batch terminator in Microsoft SQL Server world...
[quoted text, click to view] >Well, I need to know any other nuances like that when
> using CREATE DOMAIN, CREATE TABLE, and ALTER TABLE. I'm not sure when
> to use GO as I've seen people use it with plenty of commands and few
> as well.
you can find lot of these in BooksOn Line, the official guide to SQL Server,
available for free downloadat:
SQL Server 2005 -
http://www.microsoft.com/downloads/details.aspx?FamilyID=BE6A2C5D-00DF-4220-B133-29C1E0B6585F&displaylang=en SQL Server 2000 -
http://www.microsoft.com/technet/prodtechnol/sql/2000/downloads/docs/default.mspx BTW, CREATE DOMAIN is not supported in Microsoft SQL Server..
[quoted text, click to view] > Another part that throws me for a loop (mostly cause I can't find
> documentation or tutorials) is that it keeps using commands like "exec
> sp_dboption," "exec sp_change_users_login," "exec
> sp_addsrvrolemember," "exec sp_addrolemember," "GRANT ... CREATE RULE
> TO."
these "kind of" statements are proprietary system stored procedures to
perform management tasks..
again, you can find them and their explanation in BOL..
[quoted text, click to view] > I'm more worried about how persistent these settings are than I
> am anything else.
eventually please review the "depracation" status of some
keywords/procedures/etc..
for instance, SQL Server 7.0 and 2000 used to attach databases via a system
stored procedure, sp_attach_db, now deprecated (in SQL Server 2005) in
favour of a proprietary extension of the CREATE DATABASE statement, CREATE
DATABASE .... FOR ATTACH, which perform the very same action, but can be
removed in future versions of SQL Server...
sp_adduser deprecated in favour of CREATE USER ... etc...
[quoted text, click to view] > I just need to find a tutorial or some other form of help to figure
> out what else needs to go into my .sql file that has all my DDL
> statements. Any help would be appreciated. Any thoughts?
you can have a look in BOL at the supported syntax of each DDL statement as
long as it's requirements..
regards
--
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz http://italy.mvps.org DbaMgr2k ver 0.21.0 - DbaMgr ver 0.65.0 and further SQL Tools
--------- remove DMO to reply