SQL Bitwise Operators

Bitwise Operators X Y X&Y X|Y X^Y ~X 0 0 0 0 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 0 See the following topics: & (Bitwise AND) &= (Bitwise AND Assignment) | (Bitwise OR) |= (Bitwise OR Assignment) ^ (Bitwise Exclusive OR) ^=... » read more

Creating Unique Constraints

Unique constraint on a column to prevent duplicate entry on a column. Using SQL Server Management Studio In Object Explorer, right-click the table to which you want to add a unique constraint, and click Design. On the Table Designer menu, click Indexes/Keys. In the Indexes/Keys dialog box, click Add. In the grid under General, click Type and choose Unique Key from the drop-down list box to the right... » read more

TSQL: Replicas Database

Query to return info about replicas. Query to return a list of Primary Replicas databases. Query to return a list of Non-Primary Replicas databases.