Referential Integrity

OK, I’ve talked about Primary Keys and Foreign Keys.  Now let’s talk about Referential Integrity.  Basically this just means that any Foreign Key value in one table has to have that same value defined in the table where that Foreign Key is the Primary Key.  Let’s look at two tables, and try to explain this… Continue reading Referential Integrity


Ok, you understand how to create an INDEX.  You understand the differences in CLUSTERED and NONCLUSTERED indexes.  Did you know you could index a view? You can.  But before you start adding indexes, just like you would for a table, you’ll have to create an UNIQUE CLUSTERED INDEX on that index.   The reason for that… Continue reading SQL 102 – UNIQUE INDEX