If you have installed SQL server 2012 Enterprise Evaluation Edition, this trial software will expire after 180 days without any pre alert notification. This SQL query will show the current version and edition of SQL Server you are using.
SQL Server 2012 has introduced the new logical function IIF(). The behavior of function IIF() is quite similar to CASE and IF statements in SQL Server. Using IIF(), you can use fewer lines of code, and your code will be more readable.
SQLCMD command line Utility is an alternative way to execute SQL scripts using the command line. This allows us to execute SQL scripts without touching SQL Server Management Studio (SSMS) GUI.
SQL Server 2012 introduced the powerful new CHOOSE() function. This tech-recipe will explore its use and common mistakes through some simple examples.
Errors warning that “there is already an object” and that the “database already exists” can easily be avoided by first determining if your table and database have already been created.
Losing your patience while writing long lines of code in SQL is understandable. SSMS includes a feature to show line numbers in your query editor to assist with this process. Instructions for SQL Server versions 2005, 2008, and 2012 are included.
When modifying an important table in the database, user frequently backup the table by making a copy of the original table with a different name. Using a stored procedure makes this process simple and convenient to reuse.
The replicate T-SQL function in Microsoft’s SQL Server makes it simple to add leading zeros to a number value.
Frequently, when working with SQL, we need to know if a file exists in a local directory or not. This can be done using SQL Server’s built-in procedure known as master.dbo.xp_fileexist. This user-defined function (UDF) checks whether or not a file exists in a specified directory.