Renaming Indexes with sp_rename Procedure

Total: 2 Average: 5

Not so long ago, I was working on a project where we needed to change the data type of a table. The table had millions of rows, and we decided to create a separate table using the existing table definition and insert the rows into that table. After exporting data into the new table, we renamed the old table, constraint, and indexes using the sp_rename stored procedure.

The current article is dedicated to the ways of renaming indexes. 

Read More

How to Count the Number of Rows in SQL Server Table

Total: 1 Average: 5

Recently, I was working on a database performance improvement project. One stored procedure there was causing issues. In its code, a query populated the Count of the rows and stored the value in a local variable. That query was scanning a large table. Due to that, resource utilization became significantly higher. To fix the issue, we removed the faulty code and used the SQL Server catalog views to generate the Count of rows of the table.

Read More

An Overview of the PRINT Statement in SQL Server

Total: 1 Average: 5

The SQL PRINT statement serves to display the user-defined message. For example, you are developing a script with T-SQL Loops, and you want to display some specific message on each iteration of a loop. Then you can use the PRINT statement. Or, you can use it when developing a script with conditional statements. In that case, you ensure that the condition evaluated by the statement performs the correct step or generates the correct output. The PRINT statement can also be used to track the process of a T-SQL query or a stored procedure or to return the customized message.

Read More

A Quick Guide on Installing MySQL on Ubuntu

Total: 1 Average: 5

This article will present the step-by-step installation process of the MySQL server on Ubuntu. For demonstration purposes, I created a virtual machine using Oracle VM virtual box and set up Ubuntu 18.04 on the virtual box. I’d recommend you referring to the article Creating a Virtual Machine with Oracle VM Virtual Box for a better understanding of the installing process and creating a virtual machine on Oracle VM virtual box. Also, you may turn to the article How to Install Ubuntu 18.04 for more information about installing Ubuntu 18.04 on the virtual machine.

Read More