create table [logs] ( id int not null primary key identity, [date] datetime default getdate(), /* I=info; E=error, W=warning */ [type] varchar(1) check ( [type] in ( 'I', 'E', 'W' ) ), [description] nvarchar( 1024 ), [data_group] varchar( 10 ) )
Microsoft AX 2012, X++, C#, SQL server, SSRS, Java, JavaFX, Oracle, PL/SQL, Delphi - codes examples, step-by-step tutorials, experiences.
Thursday, December 7, 2017
SQL SERVER - How create table with constraint on column
This example shows creating table with constraint on column [type]. Allowed values are "I", "E" and "W" (..and null, column is not mandatory).
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment