Difference between clustered index and non clustered index


SQL Server indexes are used by queries to find data values quickly in tables and views. Basically it speed up the queries performance. You can also relate a SQL Server Indexes with any text book…

 544 total views,  4 views today

Read More...

SQL NULLIF


SQL NULLIF expression compares two expression and returns a null value if the two specified expressions are equal, else it returns the first expression. NULLIF  expression is equivalent to a searched CASE expression in which…

 204 total views,  2 views today

Read More...

SET STATISTICS IO


SQL STATISTICS IO is a set statement , when it is enabled it causes SQL Server to display information about the amount of disk activity generated by T- SQL statement. SYTANX SET STATISTICS IO {…

 157 total views

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…

 113 total views

Read More...

SQL IS NOT NULL


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

 150 total views,  2 views today

Read More...

Insert multi language data in table


Sometimes, you need to store multi language or multilingual data in any table column. Inserting a multilingual data into column without following some basics rules, you see that when you select data from table, it…

 372 total views

Read More...

SQL Random Number


SQL RAND function is a mathematical function which returns a pseudo-random float value from 0 through 1, exclusive or a random value within any range. It can also take an optional seed parameter which is…

 407 total views,  1 views today

Read More...

How to insert the result of a stored procedure into table


Sometimes, you want to store the result of a stored procedure into table or temp table instead of returning the output. Storing output of stored procedure into table enables more option for you, such as…

 711 total views,  2 views today

Read More...

SQL Delete TOP


SQL delete statement is used to delete records from table based on specific conditions which are specified in where clause. Delete statement can also be used as Delete TOP, which also allows you to use…

 483 total views

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…

 190 total views,  3 views today

Read More...

Date and Time Conversions in SQL Server


Sometimes you need to format a date in specific format such as format a date time string YYYY-MM-DD hh:mm:ss. mmm to date MM:DD:YY. SQL Server provides you a various options that you can use to…

 327 total views,  3 views today

Read More...

Get Row Counts for all tables in SQL Server


Sometime you are required to validate the row counts for each tables in database. So getting a row counts for each tables either through using a loop on each table or go and get row…

 619 total views,  22 views today

Read More...

Dynamic Data Masking in SQL Server


Dynamic data masking also known as DDM is a security feature in SQL Server which helps you to prevent the access of unauthorize users to sensitive data in the database. It was introduced in SQL…

 506 total views,  8 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…

 303 total views,  1 views today

Read More...

SQL SELECT TOP


SQL SELECT TOP statement is used to retrieve records from tables and limit the number of rows or percentage of rows returned based on a specified value. It is also known as TOP Clause or…

 228 total views,  1 views today

Read More...

How to get Ordinal Number in SQL


If any number that is written like as 1st, 2nd, 3rd and so on.. is called an ordinal number, and it is read as 1st( first), 2nd(second), 3rd(third), 4th fourth respectively. By adding a letter…

 304 total views,  4 views today

Read More...

Print Christmas tree in SQL Server


Lets see how to print a Xmas or Christmas Tree in SQL Server. The best way of implementing a Xmas tree pattern you can use a Recursive CTE, as shown in below T-SQL. Note that:  After…

 259 total views,  1 views today

Read More...