SQL SERVER EXCEPT
The SQL EXCEPT clause is used to combine two SELECT statements and returns rows from the first SELECT statement that are not returned by the second SELECT statement.
![]()
SQL Server Basics Concepts includes SQL Database Creation, Tables, SQL DML , and DDL Commands, Joins, Key Constraints, Functions and so on..
The SQL EXCEPT clause is used to combine two SELECT statements and returns rows from the first SELECT statement that are not returned by the second SELECT statement.
![]()
The SQL INTERSECT clause is used to combine two SELECT statements, but returns rows only from the first SELECT statement that are identical to a row in the second SELECT statement.
![]()
A unique key constraint is a set of one or more than one columns of a table that uniquely identify a record in a database table.
![]()
A foreign key is a key used to link two tables together. This is sometimes also called as a referencing key , usually a primary key table is considered as a parent table while a foreign key table is considered as a child table .
![]()
SQL STUFF() function is used to delete a sequence of given length of characters from a string and inserting the given sequence of characters from the specified starting index.
Syntax
STUFF(String, Start, Length, Newstring)
String – It is the string to be modified.
Start – The starting index from where the given length of characters will be deleted and new sequence of characters will be inserted.
Length -The number of characters to delete from string
![]()
The SQL TRANSLATE() is a string function that is used to replaces a sequence of characters in a string with another sequence of characters.
The function replaces a single character at a time. Until SQL Server 2016, we used use REPLACE() function to replace each character.
![]()
SQL SPACE() is a string function that replicates the number blanks that we want add to the given string.
Syntax
SPACE(number)
![]()
Database in SQL Server is a collection of tables that stores a specific set of structured data. You can eaisly interact with data such as you can Select, Update and Delete the data in tables.
![]()
The DATENAME() function returns a string, navarchar type, that represents a specified date part of date ,it can be a day , month ,year or time of specific date.
![]()
SQL DATEFROMPARTS() function is a date function that returns a date value that maps to a year, month, and day values.
![]()
The CASE statement has the functionality of an IF-THEN-ELSE . It goes through conditions and returns a value when the first condition is met . So, once a condition is true, it will stop reading and return the result.
![]()
The SQL LIKE clause is used to match a value to a similar values using wildcard operators. It is used with Where Clause.
There are two type of wildcards used in conjunction with the LIKE operator.
The percent sign (%) that is used to represent zero , one, or multiple characters.
The underscore (_) that is used to represent a single number or character.
![]()
SQL UNION ALL operator is used to combine the result sets of two or more select statements .
![]()
SQL HAVING clause specifies that a SQL select statement should only return rows where aggregate values meet the specified conditions.
![]()
SQL GROUP BY Statement is used to arrange identical data into groups with the help of Aggregate functions.
![]()
SQL ORDER BY keyword is used to sort the result set in ascending or descending order.
![]()
SQL CROSS JOIN returns a result set which is the number of rows in the first table multiplied by the number of rows in the second table if no WHERE clause is used along with CROSS JOIN
![]()