clear markdown compare help best fiddles feedback a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 984290 fiddles created (11701 in the last week).

CREATE FUNCTION dbo.validateAccountName (@AccountName varchar(25)) RETURNS INT AS BEGIN RETURN (1) ; END ;
 hidden batch(es)

CREATE TYPE [dbo].[Accounts] AS TABLE( [AccountName] [varchar](25) NOT NULL CHECK (dbo.validateAccountName(AccountName) = 1), [Sales] [int] NOT NULL, [Returns] [int] NOT NULL );
Msg 2785 Level 16 State 1 Line 3 User-defined functions, user-defined aggregates, CLR types, and methods on CLR types are not allowed in expressions in this context. Msg 1750 Level 16 State 0 Line 1 Could not create constraint. See previous errors.
 hidden batch(es)