While loop: In SQL SERVER, while loop can be used in similar manner as any other programming language. A while loop will check the condition first and then exec
Identity column of a table is a column whose value increases automatically. The value in an identity column is created by the server. A user generally cannot in
There are situations when user want to change some portion of the data inserted. The reason may be because of the human error or the change in data. For this pu
SELECT TOP clause is used to fetch limited number of rows from a database. This clause is very useful while dealing with large databases. Basic Syntax: SELECT T
BETWEEN The SQL BETWEEN condition allows you to easily test if an expression is within a range of values (inclusive). The values can be text, date, or numbers.
This post is a continuation of the SQL Concatenation Operator. Now, suppose we want to use apostrophe in our literal value but we can’t use it directly. See I
In SQL, dates are complicated for newbies, since while working with database, the format of the date in table must be matched with the input date in order to in
Following are the NULL functions defined in SQL: ISNULL(): The ISNULL function have different uses in SQL Server and MySQL. In SQL Server, ISNULL() function is
Numeric Functions are used to perform operations on numbers and return numbers. Following are the numeric functions defined in SQL: ABS(): It returns the absolu
String functions are used to perform an operation on input string and return an output string. Following are the string functions defined in SQL: ASCII(): This
Following are some of the advanced functions defined in SQL: BIN(): It converts a decimal number to a binary number. Syntax: SELECT BIN(18); Output: BINARY(): I
Top-N Analysis in SQL deals with How to limit the number of rows returned from ordered sets of data in SQL. Top-N queries ask for the n smallest or largest valu
Correlated subqueries are used for row-by-row processing. Each subquery is executed once for every row of the outer query. A correlated subquery is evaluated on
In SQL a Subquery can be simply defined as a query within another query. In other words we can say that a Subquery is a query that is embedded in WHERE clause o
The INSERT INTO statement of SQL is used to insert a new row in a table. There are two ways of using INSERT INTO statement for inserting rows: Only values: Fir
SQL Constraints Check Constraint is used to specify a predicate that every tuple must satisfy in a given relation. It limits the values that a column can hold i
This post is a continuation of SQL Offset-Fetch Clause Now, we understand that how to use the Fetch Clause in Oracle Database, along with the Specified Offset a
Trigger: A trigger is a stored procedure in database which automatically invokes whenever a special event in the database occurs. For example, a trigger can be
Structured Query Language is a standard Database language which is used to create, maintain and retrieve the relational database. What is Relational Database? R
1. INTERSECT clause : As the name suggests, the intersect clause is used to provide the result of the intersection of two select statements. This implies the re
SQL provides an extension for CREATE TABLE clause that creates a new table with the same schema of some existing table in the database. It is used to store the
We know that a primary key of a table cannot be duplicated. For instance, the roll number of a student in the student table must always be distinct. Similarly,
OFFSET and FETCH Clause are used in conjunction with SELECT and ORDER BY clause to provide a means to retrieve a range of records. OFFSET The OFFSET argument is
ALL & ANY are logical operators in SQL. They return boolean value as a result. ALL ALL operator is used to select all tuples of SELECT STATEMENT. It is also use
Pseudocolumn: A pseudo-column behaves like a table column but is not actually stored in the table. You can select from pseudo-columns, but you cannot insert, up