The need of developer changes as geographic location changes. In SQL Server there are various functions to aid this requirement. There is function CAST, which developers have been using for a long time as well function CONVERT which is a more enhanced version of CAST. In the latest version of SQL Server 2012 a new function FORMAT is introduced as well to display datetime in specific format.
SQL SERVER – Using RAND() in User Defined Functions (UDF)
Here is the question I received in email.
“Pinal,
I am writing a function where we need to generate random password. While writing T-SQL I faced following issue. Everytime I tried to use RAND() function in my User Defined Function I am getting following error:
SQL SERVER – Removing Leading Zeros From Column in Table
Some questions surprises me and make me write code which I have never explored before. Today was similar experience as well. I have always received the question regarding how to reserve leading zeroes in SQL Server while displaying them on the SSMS or another application. I have written articles on this subject over here about leading zeros.
SQLAuthority News – Microsoft SQL Server 2012 Service Pack 1 Released (SP1)
SQL SERVER – Weekly Series – Memory Lane – #003 – Database Encryption
Here is the list of selected articles of SQLAuthority.com across all these years. In this blog post, we will talk about database encryption.
SQL SERVER – Retrieving Random Rows from Table Using NEWID()
SQL SERVER – Concurrency Basics – Guest Post by Vinod Kumar
SQL SERVER – Rename Columnname or Tablename – SQL in Sixty Seconds #032 – Video
We all make mistakes at some point of time and we all change our opinion. There are quite a lot of people in the world who have changed their name after they have grown up. Some corrected their parent’s mistake and some create new mistake. Well, databases are not protected from such incidents. There are many reasons why developers may want to change the name of the column or table after it was initially created. The goal of this video is not to dwell on the reasons, but to learn how we can rename the column and table.