In SQL, the AND operator allows you to check for multiple conditions when filtering your queries.
The AND operator combines two Boolean expressions and returns TRUE when both expressions are TRUE.
In SQL, the EXISTS operator specifies a subquery to test for the existence of rows. It returns TRUE when the subquery returns one or more rows.
A subquery is a query that is nested inside another query (or even another subquery)
This article contains some basic examples of the EXISTS operator.
The SQL CREATE TABLE ... AS SELECT statement enables you to insert the results of a query into a new table.
The SQL INSERT statement is most commonly used to insert individual rows into a table.
But you can also insert the results of a query into a table. This means that you can insert multiple rows at once (as long as they’re returned by the query).
SQL Server has the UPDATE() function that you can use within your DML triggers to check whether or not a specific column has been updated.
While this function only accepts one column, there’s nothing to stop you from including multiple UPDATE() clauses with AND or OR to test for multiple column updates.
In SQL Server, you can query the sys.partitions system catalog view to find out whether or not a partition has been compressed.
In particular, the data_compression column tells you whether it’s compressed or not. The data_compression_desc column tells you what type of compression it uses. If it isn’t compressed, it returns NONE.