Saturday, August 13, 2022

How to find top 10 records from a table in Oracle, MySQL, and SQL Server? Examples

Finding top 10 records is common need for programmers working with tables and database. Be it courses, cars, cricket, players, etc. The list is never-ending. But how do select TOP records from the database? As this is what happens in the back-end. So, if you are also looking for the answer to this question, check out this article and know more. We will see how to select the TOP 10 records from different databases with practical examples.

Sunday, July 31, 2022

How to convert String to Date in SQL Server and T-SQL? Example tutorial

While working with crude information, you may oftentimes confront date values put away as text. Changing these qualities over completely to a date information type is vital since dates might be more significant during examination. In SQL Server, switching a string over completely to date can be accomplished in various methodologies.  In this article, we will cover various techniques to convert String to Date in all databases. 

Sunday, June 12, 2022

10 Example of ALTER Clause in SQL

ALTER clause is one of the DDL commands which allows you to change object structure  in database like  table, stored procedure, trigger, or any other object in the database. By using ALTER command you can add or remove columns in a table, you can add and remove index from a table as well as you can update a stored procedure.  ALTER command is an essential SQL commands for programmers similar to SELECT, UPDATE, and DELETE. If you know how to create a table or index then you should also know how to modify a table or index using ALTER command. In this article, we'll see some common ALTER table examples in SQL to learn this command better and become a better database developer. 

Friday, May 13, 2022

How to use Stored Procedure in SQL or Database? Pros and Cons with Example

Hello folks if you want to learn about Stored Procedures in SQL and how it can help you to create a layer of abstraction around functionality then you have come to the right place.  With the help of many examples, we will learn how to construct stored procedures in SQL Server.

Saturday, May 7, 2022

Difference between UNION and UNION ALL in SQL

Hello guys, if you are wondering how to combine data from multiple tables into one result set in SQL then there are multiple options. Earlier, we have looked at JOIN which allows you to fetch data from multiple table in single query, other option is UNION and UNION ALL which you can use to combine the data from multiple tables. We saved data in SQL tables in the relational database. We may need to choose data from various tables and aggregate the results of all Select statements on occasion. The SQL Union and versus Union All operators in SQL Server are explained in this article. We'll also look at the differences between these two operators, as well as some applications.

Saturday, April 23, 2022

How to use WHERE and HAVING clause in SQL? Example Tutorial

Hello guys, if you want to learn about WHERE and HAVING clause in SQL then you have come to the right place. This blog shall be explaining how to use WHERE and HAVING clauses in SQL. but it won't be fine if we just jump to it. We need a good understanding of what SQL is and what it is used for. SQL stands for structured queried language, as it sounds it is a language or syntax that is used to query the database.

Saturday, April 2, 2022

What are T-SQL window functions? How to use it and Performance Analysis

What are T-SQL window functions?

 T-SQL window functions make creating a lot of queries easier, and they typically outperform previous approaches. Using the LAG function, for example, is far superior to doing a self-join. To improve overall performance, you must first comprehend the notion of framing and how window functions rely on sorting to provide results.