MySQL does not have any system function like SQL Server’s row_number () to generate the row number for each row. However, it can be generated using the variable in the SELECT statement. Let us see how MySQL Generating Row Number.
SQL SERVER – 28 Links for Learning SQL Wait Stats from Beginning
It has been exact two years since I have written series on SQL Wait Statistics and Queues. I often received quite a few questions related to this subject. Here are my answers to the questions. Q: The series which you have written two years ago, is it still relevant to…
Read MoreSQL SERVER – Statistical Analysis in SQL Server – A Quick Introduction
SQL Server has very few statistical functions. Oracle has lots of them. XLeratorDB closes the gap. If you want to try out the example of this blog post, I suggest you download the 15-day free trial of XLeratorDB NOW. Most SQL Server users would never think of T-SQL as a…
Read MoreSQL Puzzle – A Quick Fun with Bit Wise Operator – Part 2
This is a follow up, puzzle of SQL Puzzle – A Quick Fun with BitWise Operator. Lots of people really like the earlier puzzle where I have used Bit Wise Operator AND and build a simple puzzle. Today we are going to use another bit wise operator – OR. First execute…
Read More9 Things You Should be Doing with Your Backups – Backup Tips – SQL Server Backup Tips
SQL Server backups are essential for any business that store their data in SQL Server. The following is a list of best practices you should be following if you are the person in charge with maintaining your organization’s databases. Let us see some of the SQL Server Backup Tips.
SQL SERVER – Rename a Table Name Containing [ or ] in the Name – Identifier in the Table Name
Just a day ago, my old colleague sent me an email. “I accidently renamed my tablename as a [], and now I am not able to rename it back with the help of T-SQL to its original name which was ProjectA. Is there any way to fix it?” Very interesting…
Read MoreSQL SERVER – MySQL – LIMIT and OFFSET – Skip and Return Only Next Few Rows – Paging Solution
Working with MySQL and SQL Server together has its own sets of fun. Here is one example how you can implement paging in MySQL or SQL Server. Both of them have LIMIT and OFFSET mechanism. You can Skip few rows and return few rows from the sorted result set with the help of OFFSET keywords. Let us see how we can do that quickly in the both of the database. We will use AdventureWorks sample database for SQL Server and sakila sample database for MySQL.




