SQL Azure and T-SQL

SQL Server Azure database supports the T-SQL, but no at all! For the SQL Server Azure and T-SQL are available three list (Supported, Partially Supported & Unsupported – statements):

Supported T-SQL statements.

  • ALTER (SCHEMA, VIEW, ROLE)
  • BEGIN…END
  • CAST & CONVERT
  • DROP (SCHEMA, ROLE, LOGIN, USER, VIEW, STATISTICS, etc)
  • ORDER BY
  • OUPUT
  • RAISERROR
  • SET (DATEFIRST, DATEFORMAT etc…)
    etc.
    Check for the full list here.

Partially supported T-SQL statements.

  • ALTER (DATABASE, FUNCTION, INDEX, PROCEDURE, etc)
  • CREATE (TABLE, INDEX, TRIGGER etc)
  • GRANT (Database Persmissions, Database Principal Permissions etc)
  • DROP (DATABASE, INDEX, TABLE, TRIGGER, etc)
    etc.
    Check for the full list and further details here.

Unsupported T-SQL statements.

  • BACKUP & RESTORE
  • BULK INSERT
  • RECONFIGURE
  • DATABASEPROPERTY
  • DBCC (HELP, CHECKDB, CHECKTABLE, SHRINKFILE etc)
  • RECONFIGURE
    etc.
    Check for the full list and other details here.

Let’s take a look with an example:

~You cannot use:
SELECT * INTO NewTableName
FROM SourceTable

to create direct new table with T-SQL statement.

In this case you should create the NewTableName with the same structure as source table:

CREATE TABLE NewTableName
(
Fields datatypes
… same structure as source_table

);
GO

then

INSERT INTO NewTableName (Fields…)
SELECT Fields
FROM SourceTable

* Check for more samples.

~~~
Stay Tuned!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s