SQL Server Date


Date data type allows you to store the date data in the database. It takes 3 bytes to store a date value. SYNTAX date The format of date is YYY-MM-DD, where YYYY is four digits…

 38 total views,  5 views today

Read More...

SQL IS NULL


The IS NULL is used in SQL to find a NULL value. It returns TRUE if a NULL value is found, otherwise it returns FALSE. SYNTAX SELECT col1, col2, .. FROM Table WHERE Expression IS…

 119 total views,  2 views today

Read More...

Delete Horizontal White Space in SQL Serve


When you are required to import data received from different different file format such as .txt, .csv., or excel files, sometimes you see a white spaces along with the data, which may create a problem…

 192 total views,  1 views today

Read More...

View Collation Information in SQL Server


Collations in SQL Server provide sorting rules, case, and accent sensitivity properties for your data. You can easily find SQL collation at the server, database and column level using SQL Server System Catalog views, or…

 310 total views,  1 views today

Read More...

Change the column name and data type of result set of stored procedure


SQL Server 2012 has released a new feature WITH RESULT SETS, which allows column names and their data types to be changed in the result set of a stored procedure. If you need to change the…

 466 total views,  2 views today

Read More...

SQL Server Lag Function


SQL Server LAG() function is a Analytics Functions that provides access to a row at a given physical offset that comes before the current row.

 107 total views,  1 views today

Read More...

SQL Server CONCAT_WS Function


SQL Server CONCAT_WS() function is a string function that is used concatenates two or more strings together with a separator.

It separates those concatenated string values with the delimiter specified in the first function parameter.

 447 total views,  1 views today

Read More...

SQL Server Computed Columns


A computed column is a virtual column which is used to add a new column to a table with the value derived from the values of other columns in the same table.

Computed column is not physically stored in the table, unless column is marked PERSISTED and it is persisted only if its expression is deterministic.

 226 total views

Read More...

SQL Server Interview Question & Answer Quiz on CREATE statement


SQL Server Interview Question & Answer Quiz on CREATE statement

 86 total views

Read More...

SQL SERVER Interview Q & A QUIZ on SUBSTRING()


SQL interview question and answer on Substring function

 407 total views,  6 views today

Read More...

SQL Server DENSE_RANK()


The DENSE_RANK() is a Ranking function that is used to assign ranks to rows in partitions with no gaps in the ranking values.

 138 total views,  1 views today

Read More...

SQL RANK()


The RANK()  function is a window function that is used to assign a rank to each row in the partition of a result set.

 218 total views

Read More...

SQL Server ROW_NUMBER()


SQL Row_Number() is a ranking function/window function that is used to assign a sequential integer to each row within a partition of a result set. The row number starts with one for the first row in each partition.

 110 total views,  2 views today

Read More...

SQL SERVER INTERSECT


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.

 97 total views,  1 views today

Read More...

SQL SERVER User Defined Table Type and Table Valued Parameters


The Concept of User Defined table type and table valued parameters were introduced in SQL server 2008.

 1,820 total views,  13 views today

Read More...

SQL Q & A on SELECT Statement


Q 1 > SELECT Count(1) as Output 1> NULL 2> Error 3> 1 4> Invalid select statement Answer   Q 2 > SELECT Count(*) as Output 1> NULL 2> 1 3> Error 4> Invalid select…

 153 total views

Read More...

SQL Primary Key constraint


A PRIMARY KEY constraint uniquely identifies each record in a table .

 125 total views

Read More...

How to access a data of table from another database in SQL Server?


How to copy a data of table from another database in SQL Server?

Suppose, you have a database1 and table1 and one another database2 and table2  in SQL server.

Now you are required to select data of a table1 of database1 from database2 of table2.

What would be a query for that?

 2,289 total views,  18 views today

Read More...

SQL CHARINDEX()


SQL CHARINDEX() function searches for a substring inside a string starting from a specified location.

 108 total views,  1 views today

Read More...