use db;
...
if not exists
( select 'x' from sys.systypes
where
lower( name ) = 'user'
)
begin
create type [dbo].[USER] from nvarchar(25);
end;
And using it in create table statement:create table [users]
(
ident [dbo].[USER] not null primary key,
[name] [dbo].[USER_NAME],
[active] bit not null default 1
);
No comments:
Post a Comment