The SQL Intersect Operator
The SQL Intersect operator returns distinct rows that are output by both the left and right input queries operator. SELECT expression1, expression2, … FROM tablesINTERSECTSELECT expression1, expression2, … FROM tables
The SQL Intersect operator returns distinct rows that are output by both the left and right input queries operator. SELECT expression1, expression2, … FROM tablesINTERSECTSELECT expression1, expression2, … FROM tables
The SQL MINUS operator makes use of two SQL statements. It takes all the results from the first statement and subtracts out the ones that are present in the second
After each Transact-SQL statement, the server sets the value of this variable to the total number of records affected by it. It can be used to verify the success of
Certain reports need to show data that excludes data from weekends. There is a couple of ways to approach this. You could create a Calendar table, but sometimes you do
There will be times when you need to get the next number in a sequence. Say, for example, you store all student numbers, or you keep track of them. Then,
You can use a normal SELECT query joined with a bunch of AND statements to determine if a certain value exists, but this can become cumbersome and tedious. Enter the
There will be times that you encounter a situation where you have to update a row, if it exists, or create a new row if the certain data is not
A nifty little trick is to be able to list all the Tables or Views, or even both, present in a database. A quick way to get All the Tables
You can use the PIVOT SQL command to transpose Row data into Column data. This means that you can take a set of rows and make fields out of them!