Search code examples
azure-sql-databaseuser-defined-types

SQL Azure Create Rule walkaround to use UserDefinedDataType


CREATE RULE is not supported on SQL AZURE. Is there a walkaround ?

CREATE RULE [dbo].[Rule1] AS
@variable IS NOT NULL

I wanna use UserDefinedDataType supported in azure, to create strong type like email type, percentage type and so on. BUT without rules it's like almost useless... Any solution ? Thanks


Solution

  • User-defined rules are currently not supported on v1 servers. However, if you upgrade your server to the latest SQL Database v12 update then CREATE RULE & many other SQL Server features are available.

    See links below:

    http://azure.microsoft.com/en-us/documentation/articles/sql-database-preview-whats-new/ http://azure.microsoft.com/en-us/documentation/articles/sql-database-preview-upgrade/