If the table is already created in the database, then you can add a unique constraint later on by using this SQL query:
ALTER TABLE dbo.User
ADD CONSTRAINT ucCodes UNIQUE (fcode, scode, dcode)
More Related Contents:
- How do you view ALL text from an ntext or nvarchar(max) in SSMS?
- How do I view the full content of a text or varchar(MAX) column in SQL Server 2008 Management Studio?
- How can I automate the “generate scripts” task in SQL Server Management Studio 2008?
- Query times out when executed from web, but super-fast when executed from SSMS
- The request failed or the service did not respond in a timely fashion?
- If condition in SQL Server 2008
- Comma separated results in SQL
- sql server 2008 management studio not checking the syntax of my query
- Understanding PIVOT function in T-SQL
- Which are more performant, CTE or temporary tables?
- Using RegEx in SQL Server
- What is the best way to auto-generate INSERT statements for a SQL Server table?
- Import Excel spreadsheet columns into SQL Server database
- SqlServer: Login failed for user
- SQL Server 2008 Empty String vs. Space
- How do I use the CONCAT function in SQL Server 2008 R2?
- How do I get date/time information from a TIMESTAMP column?
- How to add xml encoding to xml Output in SQL Server
- How to: Create trigger for auto update modified date with SQL Server 2008
- What happens to the primary key Id when it goes over the limit?
- SQL Recursive CTE: Finding objects linked by property
- Convert decimal time to hours and minutes
- Sort Bullets in Database
- Converting Select results into Insert script – SQL Server
- FOR JSON PATH results in SSMS truncated to 2033 characters
- How Can I Detect and Bound Changes Between Row Values in a SQL Table?
- How to wait for 2 seconds?
- SQL Server 2008 can’t login with newly created user
- Find broken objects in SQL Server
- Populate Dataset With Table Names From Stored Procedure