Skip to content
Simple SQL Tutorials

Simple SQL Tutorials

Your guide to querying and developing SQL Server databases

  • Home
  • Tutorials
    • The Basics
    • Transactions
    • Normalization
    • Querying data
    • Developing Databases
    • SQL Questions
    • Identity Property
    • JOIN
    • Data Types
    • Stored Procedures
    • Window functions
    • Data Definition Language
    • Views
    • Constraints
    • Set Operators
    • Table Expressions
    • Error Handling
    • Functions
    • Indexes
    • Triggers
  • Products
  • Contact
  • Privacy Policy
  • About

Constraints

SQL Server Foreign Key: Everything you need to know

Posted on October 4, 2021July 30, 2023 by Josh D
SQL Server Foreign Key: Everything you need to know

Reading Time: 16 minutesIf you have been working with SQL Server for a while, you might have heard of something called referential integrity. This is basically the idea that references between tables are accurate. In SQL Server, there are plenty of times where we’ll need to reference data from one table in another table. Continue Reading

Posted In Constraints, The Basics

SQL Server Primary Key: How it works and 6 rules you need to know

Posted on October 4, 2021July 30, 2023 by Josh D
SQL Server Primary Key: How it works and 6 rules you need to know

Reading Time: 12 minutesIf you are new to SQL Server and the process of database design, you’ve probably heard of the need to create a primary key column in your tables. You’ve likely been told that “every table needs a primary key“. But do you understand why we need a primary key constraint Continue Reading

Posted In Constraints, The Basics

Cannot update an IDENTITY column? Here’s why

Posted on September 20, 2021July 30, 2023 by Josh D
Cannot update an IDENTITY column? Here’s why

Reading Time: 7 minutesThe IDENTITY property is an extremely useful tool we can use in SQL Server to automate the values in a column. It can be especially useful for primary key columns. This property will automatically add a new integer value to a column when a new row is inserted into the Continue Reading

Posted In Constraints, Identity Property

SQL Server Unique Index: Everything you need to know

Posted on August 2, 2021July 28, 2023 by Josh D
SQL Server Unique Index: Everything you need to know

Reading Time: 8 minutesIf you know a thing or two about Clustered indexes and Nonclustered indexes, you might be looking to “round out” the topic with an understanding of what a Unique index is. Unique indexes are a great way to enforce uniqueness in a column other than the Primary Key column. If Continue Reading

Posted In Constraints, Indexes, The Basics

Posts pagination

Previous 1 2

Tutorial Categories

Navigation:

Home » Constraints » Page 2

Sign up for our newsletter!

Recent Posts

  • “Why should I save my query as a View instead of a .SQL file?” Answered!
  • SQL Server DELETE vs. TRUNCATE: What’s the difference?
  • SQL Server COALESCE System Function: How It Works
  • Can we create indexes in table variables? YES WE CAN!
  • SQL Server WINDOW Clause: Explained!
Copyright All rights reserved | Theme: Flash Blog by Unitedtheme.
SimpleSQLTutorials.com uses cookies to provide the best experience on our website through tailored advertising. By clicking Accept, you agree to our use of cookies.AcceptPrivacy policy