Sign in
Google apps
Main menu
Post a Comment On:
Blogpad
"Unique Fields at Table Creation Time"
No comments yet. -
1 – 0 of 0
Sintax:
[FieldName] type CONSTRAINT [constraint_name] UNIQUE
Example:
CREATE TABLE [Clients]
(
ClientID int NOT NULL IDENTITY(1,1) CONSTRAINT [PK_Clients] PRIMARY KEY,
ServiceCode varchar(50) NOT NULL CONSTRAINT [UQ_Clients_ServiceCode] UNIQUE
...
)
Example 2:
CREATE TABLE [Clients]
(
ClientID int NOT NULL IDENTITY(1,1) CONSTRAINT [PK_Clients] PRIMARY KEY,
ServiceCode varchar(50) NOT NULL,
CONSTRAINT [UN_Clients_Unique] UNIQUE (ClientID, ServiceCode)
...
)
posted by fc at
10:11 PM
on Jul 23, 2011
Leave your comment
You can use some HTML tags, such as
<b>, <i>, <a>
This blog does not allow anonymous comments.
Google Account
You will be asked to sign in after submitting your comment.
Please prove you're not a robot
"Unique Fields at Table Creation Time"
No comments yet. -