SQL Basics Tutorial for beginners
SQL Server Dirty Reads in concurrent transactions
SQL Server Dirty Reads problems in concurrent transactions
SQL Server LAST_VALUE function
SQL Server LAST_VALUE function is a Analytic function which returns the Last value in an ordered set of values.
SQL Server FIRST_VALUE function
SQL Server FIRST_VALUE function is a Analytic function which returns the first value in an ordered set of values.
SQL Server Composite key
SQL Server Primary key is used to uniquely identify each rows in the table but sometimes more than one column are used to uniquely identify each rows in the table.
Print Prime numbers for any given n number in SQL Server
Print a prime numbers separted by comma for any given number .
For example, the prime number for 10 , wolud be 2,3,5,7 .
Here is the query:
How to get all tables those are having a primary key
How to get all the tables in database those are having primary key constraints ?
SQL SERVER IF..ELSE
SQL Server IF..ELSE block is a control-of-flow that allows you to execute or skip a statement block based on a specified condition.
SYNTAX
IF Boolean_expression
{ sql_statement | statement_block }
[ ELSE { sql_statement | statement_block } ]
SYNTAX
IF Boolean_expression
{ sql_statement | statement_block }
[ ELSE { sql_statement | statement_block } ]
SQL Server WHILE
SQL Server WHILE loop sets a condition for the repeated execution of an SQL statement or statement block.
SQL Server NCHAR
NCHAR data type is used to store Unicode string data of fixed-length.
NCHAR data type is used to store Unicode string data of fixed-length.
It stores data at 2 byte per character.
It supports up to 4000 characters.
SQL SERVER VARCHAR
SQL Server VARCHAR Data Type is used to store non-unicode string data of varaible length.
SQL Server Download links
Following are the links to download SQL Server 2019 and Database sample files
How to split comma separated string values into columns
SQL Server CHAR data type is used to store non-Unicode string data of fixed-length.
SQL Server OFFSET FETCH
SQL Server OFFSET FETCH clauses are used to set the limit to number of rows returned by a query.
SQL Server PATINDEX
SQL Server PATINDEX function is a string function that returns the starting position of the first occurrence of a pattern in a specified expression.
How to find Nth Highest Salary in SQL Server
This is one of the most commonly asked question in SQL Server interview that how to find the Nth highest salary of employee with their… Read More »How to find Nth Highest Salary in SQL Server
SQL Server @@SPID
SQL Server @@SPID
SQL Server @@SPID is a SQL Server configuration function that is used to return the session id of current user process.
SYNTAX
@@SPID