sql database task

23 October 2012


Printer friendly version

SSIS Basics: Using the Execute SQL Task to Generate Result Sets

The Execute SQL Task of SSIS is extraordinarily useful, but it can cause a lot of difficulty for developers learning SSIS, or only using it occasionally. What it needed, we felt, was a clear step-by-step guide that showed the basics of how to use it effectively. Annette has once again cleared the fog of confusion

The Execute SQL task is one of the handier components in SQL Server Integration Services (SSIS) because it lets you run Transact-SQL statements from within your control flow. The task is especially useful for returning result sets that can then be used by other components in your SSIS package.

When using the Execute SQL task to return a result set, you must also implement the necessary variables and parameters to pass data into and out of the T-SQL statement called by the task. In this article, we look at how to use those variables and parameters in conjunction with the Execute SQL task in order to transfer that data. (In the previous article in this series, “ Introducing Variables ,” I explained how to work with variables, so refer back to that article if you need help.)

This article walks you through two different scenarios for working with variables, parameters, and result sets. In the first scenario, we’ll use two Execute SQL tasks. The first task retrieves a single value from a table in the AdventureWorks2008 database. That value is returned by the task as a single-row result set. The second Execute SQL task will pass that value into a stored procedure that inserts the row into a different table.

The second scenario uses a single Execute SQL task to retrieve a multi-row result set, also known as a full result set. This represents the third Execute SQL task we’ll be adding to our control flow. For now, all we’ll do is use this task to save the result set to variable. In articles to follow, you’ll see how you can use that variable in other SSIS components, such as the Foreach Loop container.

Setting Up Your Environment

Before adding components to your SSIS package, you should first add a table and two stored procedures to the AdventureWorks2008 database. The table will store the value that’s returned by the first Execute SQL task. Listing 1 shows the T-SQL necessary to create the SSISLog table.

Listing 1: Creating the SSISLog table

Next, we will add a stored procedure to insert data into the SSISLog table. Listing 2 provides the T-SQL script necessary to create the UpdateSSISLog stored procedure. Notice that it includes an input parameter. The input will be the data that will be retrieved via the first Execute SQL task.

Listing 2: Creating a stored procedure that inserts data into the SSISLog table

Once you’ve set up the table and stored procedures, you can create your SSIS package, if you haven’t already done so. We’ll perform both exercises in a single package. Our next step, then, is to add a couple variables to our package.

Adding Two Variables to the SSIS Package

The first variable we’ll create is the EmpNum variable. If the Variables window is not open, right-click the Control Flow workspace, and then click V ariables . In the Variables window, add a new variable by clicking on the Add Variable icon.

Name the new variable EmpNum , and ensure that the scope is set at the package level, as indicated by the package name. (In my case, I’ve stuck with the default name, which is Package .) Next, set the data type to Int32 and the value to 0 , as shown in Figure 1. The Execute SQL task will use the variable to store the value it retrieves from the database.


Figure 1: The new EmpNum variable

Now create a second variable named EmployeeList . This variable should also be at the package scope. However, set the data type to Object . We will be using this variable to store the full result set that we retrieve in our second scenario, and SSIS requires that the variable use the Object type to accommodate the multiple rows and columns.

Adding a Connection Manager to the SSIS Package

The next step is to create a connection manager that points to the AdventureWorks2008 database. Right-click the Connection Manager s window, and then click New OLE DB Connection , as shown in Figure 2.


Figure 2: Creating a new OLE DB connection manager

When the Configur e OLE DB Connection Manager dialog box appears, click the New button to launch the Connection Manager dialog box, shown in Figure 3. From the Server name drop-down list, select the name of your SQL Server instance, and then select an authentication type. From the Select or enter a database name drop-down list, select your database. As you can see in Figure 3, I’m using Cambridge as my SQL Server instance, SQL Server Authentication as my authentication type, and the AdventureWorks2008 as my database.


Figure 3: Configuring an OLE DB connection manager

Be sure to test the connection by clicking the Test Connection button. If the connection is good, click OK to close the Connection Manager dialog box.

When you’re returned to the Configure OLE DB Connection Manager dialog box, you’ll see that your new connection has been added to the Data connections section. Click OK to close the dialog box. Your connection should now be listed in Connection Managers window.

If you want, you can rename your connection manager to something more appropriate. To do so, right-click the connection, click R ename , and type in the new name. I renamed mine to AW2008 , as shown in Figure 4.


Figure 4: Renaming a connection manager

Returning a Single-Row Result Set

As mentioned above, our first example uses two instances of the Execute SQL task. The first Execute SQL task will return a single-row result set, which in this case, will contain only one value. Note, however, that this is not a real-world example. I simply want to show you how to get the result set and use it.

In this example, we’ll retrieve the highest BusinessEntityID value from the HumanResources.Employee table and insert it into the SSISLog table, along with the current date and time. We’ll start by using the first Execute SQL task to retrieve the value and pass it to the EmpNum variable.

To get started, drag the Execute SQL task onto the Control Flow design surface. Then double-click the task to open the Execute SQL Task Editor . The editor opens to the General page, as shown in Figure 5.


Figure 5: The General page of the Execute SQL Task Editor

Notice that the General section contains the Name property and the Description property. The Name property refers to the task name. You should name the task something suitable. On my system, I named the task Get ResultSet . I then added a description to the Description property to explain what the task does.

In the Options section, I stuck with the default property values.

The next section on the General page is Result Set . Notice that this section includes only the ResultSet property. The property lets you select one of the following four options:

  • None : The query returns no result set.
  • Single row : The query returns a single-row result set.
  • Full result set : The query returns a result set that can contain multiple rows.
  • XML : The query returns a result set in an XML format.

The option you select depends on the results of the query you pass into the Execute SQL task. For this exercise, our query will return only a single value. Consequently, we will choose the Single row option.

Next, we need to configure the properties in the SQL Statement section. Table 1 shows the values you should use to configure these properties.

Table 1: Configuring the properties in the SQL Statement section

Our next step is to associate our result set value with a variable that will store the value we retrieve from the database. To do this, go to the Result Set page of the Execute SQL Task Editor .

The main grid of the Result Set page contains two columns: Result Name and Variable Name . Click the Add button to add a row to the grid. In the Result Name column, enter the column name returned by your query ( MaxEmpID ). In the Variable Name column, select the User:: EmpNum variable. Your Result Set page should now look similar to the one shown in Figure 6.


Figure 6: Associating your result set value with a variable

If our single-row result set contains multiple columns, we would have had to map a variable to each column. However, because we returned only one value, we needed only one mapping.

Once you’ve associated your result set value with a variable, click OK to close the Execute SQL Task Editor . You task should now be set up to return a single-row result set. Now we need to do something with that result set!

Working with a Single-Row Result Set

Our next step is to drag a new Execute SQL task onto our design surface so we can use the result set returned by the first Execute SQL task. So add the task, and then connect the precedence constraint (the green arrow) from the first task to the new one. Next, right-click the second task and click Edit to open the Execute SQL Task Editor , shown in Figure 7.


Figure 7: Configuring the Execute SQL Task Editor

In the General section, provide a name and description for the task. (I named the task Using Result Set .) For the ResultSet property, stick with the default value, None . In this case, the task won’t be returning a result set. Instead, we’ll be using the results returned by the previous task.

Now let’s look at the SQL Statement section shown in Figure 8. Notice that, for the SQLStatement property, I entered the following T-SQL code:

As you can see, we’re executing the UpdateSSISLog stored procedure. Notice, however, that we follow the name of the stored procedure with a question mark ( ? ). The question mark serves as a placeholder for the parameter value that the stored procedure requires. You cannot name parameters within the actual query, so we have to take another step to provide our value.

Go to the Parameter Mapping page of the Execute SQL Task Editor . On this page, you map the parameters referenced in your queries to variables. You create your mappings in the main grid, which contains the following five columns:

  • Variable Name : The variable that contains the value to be used for the parameter. In this case, we’ll use the User:: EmpNum variable, which contains the result set value returned by the first Execute SQL task.
  • Direction : Determines whether to pass a value into a parameter (input) or return a value through the parameter (output)
  • Data Type : Determines the type of data provided from the variable. This will default to the type used when setting up the variable.
  • Parameter Name : The name of the parameter. The way in which parameters are named depends on your connection type. When running a T-SQL statement against a SQL Server database through an OLE DB connection, as we’re doing here, we use numerical values to represent the statement’s parameters, in the order they appear in the statement, starting with 0 . In this case, because there’s only one parameter, we use 0 .
  • Parameter Size : The size of the parameter if it can be a variable length. The default is -1 , which lets SQL Server determine the correct size.

Once you’ve mapped your variable to your parameter, the Parameter Mapping page should look similar to the one shown in Figure 8.


Figure 8: Mapping a variable to a parameter

When you’re finished configuring the Execute SQL task, click OK .

Your package should now be ready to run. Click the green Execute button. When the package has completed running, query the SSISLog table and verify that a row has been added that contains the expected results.

Returning a Full Result Set

Using the Execute SQL task to return a full result set is similar to returning a single-row result set. The primary differences are that your target variable must be configured with the Object data type, and the task’s ResultSet property must be set to Full result set .

Let’s run through an example to demonstrate how this works. This time, rather than retrieving a single value, we’re going to retrieve a result set that contains multiple rows and columns.

For this exercise, we can use the same SSIS package we used for the previous example, but keep in mind, if you execute the package, all components will run unless you specifically disable those that you don’t want to have run.

Drag an Execute SQ L task to the design surface. Open the task’s editor and configure the properties as necessary. Remember to set the ResultSet property to Full result set . For the SQLStatement property, use the SELECT statement shown in Listing 3. When entering a long SELECT statement into as the property’s value, it’s easier to click the ellipses button to the right of the property to open the Enter SQL Query dialog box and then entering the statement there.

Listing 3: The SELECT statement used to return a full result set

After you enter your SELECT statement, close the Enter SQL Query dialog box. When you’re returned to the Execute SQL Task Editor , the General page should now look similar to the one shown in Figure 9.


Figure 9: Configuring the Execute SQL task to return a full result set

Next, go to Result Set page and add a row to the main grid. Because we’re returning a full result set, you should enter 0 in the Result Name column. (The same is true if you’re returning an XML result set). Then, in the Variable Name column, select the User:: E mployeeList variable.

Once this is complete, click OK . Your Execute SQL task will now return a full result set and save it to the E mployeeList variable. (You should execute the task to make sure it runs.) You can then use that variable in other SSIS components. However, to do so is a bit more complicated than what we saw for a single-row result set, so I’ll save that discussion for another time. But feel free to try using the variable if your up for it. You might want to start with a Foreach Loop container.

In this article, I demonstrated how to use an Execute SQL task to return a single-row result set with a single value and save that value to a variable. I then showed you how to use the variable in a second Execute SQL task to insert data into a table.

In the second example, I demonstrated how to use an Execute SQL task to return a full result set and save it to a variable configured with the Object data type. Although I did not show you how to use the result set in other components, you should now have a good sense of the principles behind using the Execute SQL task to retrieve result sets and saving them to variables.

In future articles, I’ll demonstrate how you can use those result sets in other components, such as the Script task and the Foreach Loop container.

Subscribe for more articles

Fortnightly newsletters help sharpen your skills and keep you ahead, with articles, ebooks and opinion to keep you informed.

Rate this article

sql database task

Annette Allen

Annette is a Microsoft SQL Server MVP, and has been a SQL Developer since 2000, starting work with a London City based Law firm before moving to Cornwall and working as a part Developer part Managerial role. She then worked as Developer for a health care company and in 2015 joined the University of Exeter where she was the SQL Server DBA. Now Annette is working as a remote DBA for WellData, a leading UK provider of database support. Contact Annette: Email: [email protected] Twitter: @Mrs_Fatherjack

Follow Annette Allen via

View all articles by Annette Allen

Load comments

Related articles

sql database task

Introduction to SQL Server Spatial Data

  • T-SQL Programming

sql database task

What’s new in T-SQL in SQL Server 2022

sql database task

Feature Flags in Data Projects

Learn SQL Queries – Database Query Tutorial for Beginners

Dionysia Lemonaki

SQL stands for Structured Query Language and is a language that you use to manage data in databases. SQL consists of commands and declarative statements that act as instructions to the database so it can perform tasks.

You can use SQL commands to create a table in a database, to add and make changes to large amounts of data, to search through it to quickly find something specific, or to delete a table all together.

In this article, we'll look at some of the most common SQL commands for beginners and how you can use them to effectively query a database – that is, make a request for specific information.

The Basic Structure of a Database

Before we get started, you should understand the hierarchy of a database.

An SQL database is a collection of related information stored in tables. Each table has columns that describe the data in them, and rows that contain the actual data. A field is a single piece of data within a row. So to fetch the desired data we need to get specific.

For example, a remote company can have multiple databases. To see a full list of their databases, we can type SHOW DATABASES; and we can zone in on the Employees database.

The output will look something like this:

A single database can have multiple tables. Taking the example from above, to see the different tables in the employees database, we can do SHOW TABLES in employees; . The tables can be Engineering , Product , Marketing , and Sales for the different teams the company has.

All tables then consist of different columns that describe the data.

To see the different columns use Describe Engineering; . For example the Engineering table can have columns that define a single attribute like employee_id , first_name , last_name , email , country , and salary .

Here's the output:

Tables also consist of rows, which are individual entries into the table. For example a row would include entries under employee_id , first_name , last_name , email , salary , and country . These rows would define and provide info about one person on the Engineering team.

Basic SQL Queries

All the operatations that you can do with data follow the CRUD acronym.

CRUD stands for the 4 main operations we perform when we query a database: Create, Read, Update, and Delete.

We CREATE information in the database, we READ /Retrieve that information from the database, we UPDATE /manipulate it, and if we want we can DELETE it.

Below we'll look at some basic SQL queries along with their syntax to get started.


To create a database named engineering , we can use the following code:


This query creates a new table inside the database.

It gives the table a name, and the different columns we want our table to have are also passed in.

There are a variety of datatypes that we can use. Some of the most common ones are: INT , DECIMAL , DATETIME , VARCHAR , NVARCHAR , FLOAT , and BIT .

From our example above, this could look like the following code:

The table we create from this data would look something similar to this:


After creating the table, we can modify it by adding another column to it.

For example, if we wanted we could add a birthday column to our existing table by typing:

Now our table will look like this:

SQL INSERT Statement

This is how we insert data into tables and create new rows. It's the C part in CRUD.

In the INSERT INTO part, we can specify the columns we want to fill with information.

Inside VALUES goes the information we want to store. This creates a new record in the table which is a new row.

Whenever we insert string values, they are enclosed in single quotes, '' .

For example:

The table would now look like this:

SQL SELECT Statement

This statement fetches data from the database. It is the R part of CRUD.

From our example earlier, this would look like the following:

The SELECT statement points to the specific column we want to fetch data from that we want shown in the results.

The FROM part determines the table itself.

Here's another example of SELECT :

The asterisk * will grab all the information from the table we specify.

SQL WHERE Statement

WHERE allows us to get more specific with our queries.

If we wanted to filter through our Engineering table to search for employees that have a specific salary, we would use WHERE .

The table from the previous example:

Would now have the output below:

This filters through and shows the results that satisfy the condition – that is, it shows only the rows of the people whose salary is more than 1500 .

SQL AND , OR , and BETWEEN Operators

These operators allow you to make the query even more specific by adding more criteria to the WHERE statement.

The AND operator takes in two conditions and they both must be true in order for the row to be shown in the result.

The OR operator takes in two conditions, and either one must be true in order for the row to be shown in the result.

The BETWEEN operator filters out within a specific range of numbers or text.

We can also use these operators in combination with each other.

Say our table was now like this:

If we used a statement like the one below:

We'd get this output:

This selects all comlumns that have an employee_id between 3 and 7 AND have a country of Germany.

SQL ORDER BY Statement

ORDER BY sorts by the columns we mentioned in the SELECT statement.

It sorts through the results and presents them in either descending or ascending alphabetical or numerical order (with the default order being ascending).

We can specify that with the command: ORDER BY column_name DESC | ASC .

In the example above, we sort through the employees' salaries in the engineering team and present them in descending numerical order.

SQL GROUP BY Statement

GROUP BY lets us combine rows with identical data and similarites.

It is helpful to arrange duplicate data and entries that appear many times in the table.

Here COUNT(*) counts each row separately and returns the number of rows in the specified table while also preservering duplicate rows.

SQL LIMIT Statement

LIMIT lets you spefify the maximum number of rows that should be returned in the results.

This is helpful when working through a large dataset which can cause queries to take a long time to run. By limiting the results you get, it can save you time.

SQL UPDATE Statement

This is how we update a row in a table. It's the U part of CRUD.

The WHERE condition specifies the record you want to edit.

Our table from before:

Would now look like this:

This updates the country of residence column of an employee with an id of 1.

We can also update information in a table with values from another table with JOIN .

SQL DELETE Statement

DELETE is the D part of CRUD. It's how we delete a record from a table.

The basic syntax looks like this:

For instance, in our engineering example that could look like this:

This deletes the record of an employee in the engineering team with an id of 2.


To remove a specific column from the table we would do this:


To delete the whole table we can do this:

In this article we went over some of the basic queries you'll use as a SQL beginner.

We learned how to create tables and rows, how to gather and update information, and finally how to delete data. We also mapped the SQL queries to their corresponding CRUD actions.

Thanks for reading and happy coding!

Read more posts .

If this article was helpful, share it .

Learn to code for free. freeCodeCamp's open source curriculum has helped more than 40,000 people get jobs as developers. Get started

The Best Way to Learn SQL: A Complete Guide for Beginners

Author's photo

  • SQL Queries

If you've ever wondered about the best way to learn SQL, you're in the right place. Whether you're a complete beginner or an experienced professional looking to upskill, this comprehensive guide will show you the way.

In today's data-driven world, you can think of data as a treasure chest full of gold. And SQL (Structured Query Language) is your personal key to unlocking it. SQL is a potent tool that allows you to communicate with databases, enabling you to extract, shape, and make sense of data.

Are you just starting your career path? Or maybe you’re a seasoned professional aiming to broaden your skill set. In either case, mastering SQL can be a game changer. It can open doors to new opportunities and give your career a significant boost.

If you're new to SQL or have no IT experience, don't worry. SQL is a user-friendly language that's designed to be intuitive and straightforward. In fact, many people have successfully learned SQL on their own, starting from scratch. And the best part? You don't need any special software or expensive textbooks to get started. All you need is a web browser, an internet connection, and a willingness to learn.

One of the best ways to learn SQL is through interactive online courses. For instance, LearnSQL.com offers a course on SQL Basics that's perfect for beginners. This awesome online interactive SQL course teaches you the basics of SQL querying, including how to retrieve data from an SQL database and build simple reports. It includes 129 interactive exercises that allow you to practice what you learn, ensuring that you gain practical experience as you progress through the course.

What is SQL?

SQL is a standardized programming language that serves as the backbone for managing and manipulating databases. A database is a software product designed to hold large amounts of data in a structured way. It can hold millions of records, which isn't even possible with a spreadsheet.

SQL allows you to perform a variety of tasks, such as:

  • Creating databases and tables.
  • Changing tables and columns in a database.
  • Adding, updating, or deleting data.
  • Retrieving data based on specific criteria.

A key power of this language is that it allows you to create advanced and in-depth reports. With the right queries, you can pull out specific information from a database to create the listings and comparisons you need. In today's world, such reports are often the basis for strategic decisions. If you want to know more about this, check out our SQL Reporting track.

SQL is used by a wide range of professionals, from data analysts and data scientists to software developers and IT administrators. It's a language that transcends industries and job roles, making it an essential skill in today's data-driven world.

The history of SQL is a fascinating journey that began in the 1970s. If you're interested in learning more, read The History of SQL – How It All Began .

SQL is not just a relic of the past, though. It continues to evolve and adapt to the needs of the modern world . Over the years, this database language has become an industry standard, recognized and used by all major organizations. It's the basic language for working with databases, used daily by market giants such as Google and Facebook for a variety of processes .

Why Should You Learn SQL?

With the rise of Big Data , companies across all industries are looking for professionals who can analyze and interpret data to make informed business decisions . SQL is one of the most sought-after skills in the job market, so learning it can open up a wide range of opportunities. It’s currently one of the fastest-growing branches of the IT industry, making SQL professionals in high demand .

According to Glassdoor , the average salary for SQL jobs in the United States is around $84,000 annually, with some roles paying over $100,000 per year. Pretty sweet, right?

But the most important question is… Is learning SQL enough to get a job? While SQL is a highly sought-after skill, most jobs will require additional skills. For instance, data analysts are often expected to know other tools like Python , R, and Excel . However, knowing SQL can significantly increase your job prospects and salary potential.

People on a business meeting

Can a non-IT person learn SQL? Absolutely! SQL is a user-friendly language that doesn't require a background in IT or programming. It's designed to be intuitive and straightforward, making it accessible to professionals from all fields.

Am I too old to learn SQL? No, you're never too old to learn something new. Whether you're looking to change careers or enhance your current skillset , learning SQL can provide you with valuable opportunities.

Learning SQL: Fast Track and Self-Learning

When it comes to convenience and flexibility, finding the best way to learn SQL online can offer you the ability to learn at your own pace and in your own space. Interactive online courses, in particular, are the fastest way to learn SQL. But let's take a moment to compare this method to other forms of learning.

Books About SQL

While SQL books can be a great resource, they lack the interactive element that online courses offer. You can read about SQL concepts – but without the opportunity to practice and get feedback, it can be difficult to fully grasp these concepts and apply them. Plus, books can quickly become outdated as new versions of SQL are released.

SQL YouTube Tutorials

YouTube videos and other free online resources can also be helpful, but they often lack structure and depth. You might find a great video on a specific SQL concept, but piecing together a comprehensive understanding of SQL from disparate sources can be a challenge.

If you insist on watching YouTube, here's what you should check out:

  • The Best YouTube Channels for Learning SQL
  • Lesser-Known SQL YouTube Channels You Need to Follow Now!
  • The Best SQL Lectures on YouTube
  • YouTube Tutorials That Actually Teach You Some SQL

SQL and Database Bootcamps

Bootcamps, on the other hand, offer a more intensive learning experience. They can be a great way to learn SQL quickly, but they also require a significant time commitment and can be quite expensive. Plus, the pace of bootcamps can be overwhelming for beginners.

SQL Online Course

In contrast, interactive online courses like those offered by LearnSQL.com provide a balanced approach to learning SQL. They offer the structure and depth of a bootcamp, up-to-date content, and the flexibility of online videos. You can learn at your own pace, practice as much as you need, and have access to a wealth of resources and support. This makes them the fastest and most effective way to learn SQL.

Let's take a closer look at what such an SQL course should look like.

First, courses are easiest when they’re 100% online. Then you don't have to install anything on your device or configure anything. Everything happens in your browser; all you need is an internet connection.

An interactive online course (like those on LearnSQL.com) gives you the opportunity to write real SQL queries and see them run. In each exercise you have an online console in which you practice what you learn in the exercise - i.e. you immediately practice writing real code that will help you later in your real-world situations. It couldn't be better or easier.

Online course

Interactive SQL courses on LearnSQL.com are prepared for all skill levels. Both a complete rookie and an experienced database expert will find something for themselves.

The Best SQL Courses! from LearnSQL.com on Vimeo .

Here are some ideal courses for beginners:

  • SQL Basics in MS SQL Server
  • SQL Basics in MySQL
  • SQL Basics in PostgreSQL

If you don't know which one to choose, check out What Is a SQL Dialect, and Which One Should You Learn? For example, if you're specifically interested in Microsoft's database management system, finding the best way to learn SQL Server will be crucial for you. You can also see our article on the Top 6 Online SQL Courses for Beginners .

And here you have some of the best courses for more advanced users:

  • "Window Functions" course
  • Customer Behavior Analysis in PostgreSQL
  • Recursive Queries in MS SQL Server
  • Much more here

Can I learn SQL on my own? Yes, you can. With the wealth of resources available online – including tutorials, online courses, and forums – you can learn SQL at your own pace. However, it's important to practice what you learn through exercises and real-world projects.

Can I learn SQL in 3, 4, or 7 days? While it's possible to learn the basics of SQL in a few days, becoming proficient in SQL takes time and practice. The more you practice, the better you'll get. Fun fact: If you are in a hurry, you can Learn SQL in 10 Minutes !

Challenges in Learning SQL

Why is SQL hard to learn? This is a question often asked by beginners who are just starting their journey with SQL. While SQL is generally considered easier to learn than other programming languages, it can be challenging for beginners. This is often due to the abstract nature of databases and the need to think in a set-based way. However, with practice and persistence, these challenges can be overcome.

A woman in the office

SQL is designed to be intuitive and straightforward, making it accessible to professionals from all fields. Its syntax is logical and easy to understand, which makes it a great starting point for anyone new to programming or data analysis. In fact, SQL is often the first language taught in many data analysis and computer science programs because of its simplicity and practicality.

One of the reasons why beginners might find SQL hard to learn is because they're not sure how to approach it. Learning SQL, like any new skill, requires a structured approach and consistent practice. This is where online resources like our SQL From A to Z track can be incredibly helpful. This track offers a well-planned learning path and plenty of opportunities to practice what you've learned. It is a comprehensive learning journey that starts with the basics of SQL, guiding you through creating simple queries and retrieving data from an SQL database.

As you progress through the track's seven online SQL courses, you'll learn how to process various types of data with SQL's most-used functions. You'll also master the art of writing complex SQL queries using aggregation, subqueries, and set operations, and learn how to add, modify, and delete data from a database using SQL. Don't be afraid that you don't understand these concepts yet. With our help, you will soon be able to use them freely.

But this track isn't just about teaching you concepts; it's about providing you with hands-on practice. You'll work with a real code editor and real data sets; you’ll tackle real-life exercises. This practical approach is one of the reasons why the SQL From A to Z track is the most popular track on LearnSQL.com.

After completing each of our courses, you will receive a certificate that you can show to your boss or attach to your LinkedIn profile for recruiters to see.

Online SQL course

Here are some articles that will help you avoid roadblocks while learning and practicing SQL:

  • How to Learn SQL
  • 5 Reasons You Might Fail to Learn SQL
  • How to Learn SQL Joins
  • How to Stay Healthy When Learning SQL
  • SQL Cheat Sheets

Another thing that makes SQL beginner-friendly is its practicality. Unlike some programming languages that require you to learn a lot of theory before you can start building anything useful, SQL lets you start working with real data almost immediately. This makes the learning process much more engaging and rewarding. Plus, as you progress in your learning journey, you'll find that the concepts you struggled with initially will start to make more sense.

Absolutely anyone can learn SQL, and I'm living proof of that fact. My journey began as a journalist, far removed from the world of IT. Yet, I found myself drawn to the realm of data, and that's when I discovered SQL.

Man in front of the laptop

I took the plunge and enrolled in the SQL Basics course at LearnSQL.com. Despite having no prior IT experience, I was able to grasp the concepts and start writing SQL queries. Now, I use SQL in my daily work and it has opened up a whole new world of opportunities for me. If I – a humanities guy turned SQL enthusiast – could do it, so can you! You can read my story here .

Final Verdict: What’s the Best Way to Learn SQL?

So, what is the best way to learn SQL? I hope I convinced you that the answer is through interactive online courses. This approach allows you to learn at your own pace, practice with real-world examples, and get instant feedback. It's a flexible and effective way to master SQL, whether you're a beginner or an experienced professional looking to upskill.

Learning SQL is more than just a valuable investment in your career. It's a strategic move that can open up a wide range of opportunities and give you a competitive edge in the job market. Employees that know SQL tend to earn more than their counterparts without those skills. This is because many organizations are seeking specialists with database knowledge to stay ahead of the competition and fine-tune their business strategy.

Learning SQL is easy! With a bit of practice, you can quickly get the hang of it. And if you're really serious about learning and becoming an expert, you should consider our All Forever Package , which includes all of our current and future courses.

So, why wait? There's no better time than now to start your SQL learning journey. Make a smart career move and enhance your professional life regardless of your field. Start your SQL learning journey today with LearnSQL.com and unlock the next level of opportunities.

You may also like

sql database task

How Do You Write a SELECT Statement in SQL?

sql database task

What Is a Foreign Key in SQL?

sql database task

Enumerate and Explain All the Basic Elements of an SQL Query

Top 10 SQL Server DBA Daily Checks by SQLNetHub

Top 10 SQL Server DBA Daily Tasks List

DBAs play a major role in the everyday operation of any organization that uses databases. However, the term “healthy database” is often misinterpreted.

In the databases world, a healthy database is not just a database that is online and is not corrupted.

A healthy database, and consequently an RDBMS instance, have also an “accepted” up-time percentage, consistent and available backups, have no significant index fragmentation percentages, and much more.

Learn more tips like this! Enroll to our Online Course! Check our online course titled “ Essential SQL Server Administration Tips ” (special limited-time discount included in link). Learn essential hands-on SQL Server Administration tips  on SQL Server maintenance, security, performance, integration, error handling and more. Many live demonstrations and downloadable resources included! ( Lifetime Access / Live Demos / Downloadable Resources and more!) Learn More

All the above, and more, are things that DBAs must ensure every day.

The Top 10 SQL Server DBA Daily Tasks

Below, you can find my list of the “ Top 10 SQL Server DBA Daily Tasks “.

This list suggests 10 critical tasks SQL Server DBAs must do every day, towards ensuring healthy databases and SQL Server instances.

Here’s my list:

  • Check SQL Server Instance Up-time
  • Check Last Full, Differential and Log Backup Times
  • Check Failed SQL Agent Jobs in the Last 24 Hours
  • Check Current Log for Failed Logins
  • Check for Blocked Processes
  • Check Top N Queries Based on Average CPU Time
  • Check Drive Volumes Space
  • Check Index Fragmentation
  • Patch Management
  • Self-Education and Improvement

Get the list here ! It’s free!

Top 10 SQL Server DBA Daily Checks List

Featured online courses:.

  • AI Essentials: A Beginner’s Guide to Artificial Intelligence
  • Human-AI Synergy: Teams and Collaborative Intelligence
  • SQL Server 2022: What’s New – New and Enhanced Features
  • Working with Python on Windows and SQL Server Databases
  • Introduction to Azure Database for MySQL
  • Boost SQL Server Database Performance with In-Memory OLTP
  • Introduction to Azure SQL Database for Beginners
  • Essential SQL Server Administration Tips
  • SQL Server Fundamentals – SQL Database for Beginners
  • Essential SQL Server Development Tips for SQL Developers
  • Introduction to Computer Programming for Beginners
  • .NET Programming for Beginners – Windows Forms with C#
  • SQL Server 2019: What’s New – New and Enhanced Features
  • Entity Framework: Getting Started – Complete Beginners Guide
  • Data Management for Beginners – Main Principles
  • A Guide on How to Start and Monetize a Successful Blog
  • Applying Scrum for Efficient Database Administration
  • SQL Server Installation and Setup Best Practices
  • SQL Server Versions Currently Supported and their End Dates
  • The feature you are trying to use is on a network resource that is unavailable
  • How to rebuild all the indexes of a database in SQL Server
  • How to Patch a SQL Server Failover Cluster
  • Where are temporary tables stored in SQL Server?
  • Error converting data type varchar to float
  • What are SQL Server Statistics and Where are they Stored?
  • How to Fix SQL Server Agent Not Showing in a Failover Cluster
  • … more SQL Server Administration articles

Reference: SQLNetHub ( https://www.sqlnethub.com )

Artemakis Artemiou

Artemakis Artemiou, a distinguished Senior Database and Software Architect, brings over 20 years of expertise to the IT industry. A Certified Database, Cloud, and AI professional, he earned the Microsoft Data Platform MVP title for nine consecutive years (2009-2018). As the founder of SQLNetHub and GnoelixiAI Hub , Artemakis is dedicated to sharing his knowledge and democratizing education on various fields such as: Databases, Cloud, AI, and Software Development. His commitment to simplicity and knowledge sharing defines his impactful presence in the tech community.

Privacy Overview

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Automate database tasks for Azure SQL

  • Learning Path

Scripting repetitive tasks in Azure SQL for regular maintenance jobs and multi-instance administration. Automation of error and resource alerts. Configuration of notifications for failures.


  • Ability to use tools for running queries against a Microsoft SQL database, either on-premises on cloud-based
  • Ability to write code in the SQL language, particularly the Microsoft T-SQL dialect, at a basic level.
  • Experience creating and configuring resources using the Azure portal

Achievement Code

Would you like to request an achievement code?

Modules in this learning path

Explore multiple deployment models available on Azure. Use Azure Resource Manager (ARM) templates and Bicep files for deploying Azure SQL resources. Understand how to use PowerShell and Azure CLI for automation purposes.

Explore SQL automation for scheduled tasks, and automatic alerts for SQL Server and Azure SQL Managed Instance.

Explore automation for Azure SQL platform. Configure elastic jobs, explore Azure Automation, and evaluate different strategies for monitoring automation tasks.

Using SQLAlchemy to work with Databases vs SQL Server Management Studio

By: Levi Masonde   |   Updated: 2024-03-29   |   Comments   |   Related: > Python

If you develop applications that rely on multiple SQL or other databases on different hosts, you might find it challenging to integrate all the data sources seamlessly, which means having a uniform flow of data to and from your application.

The more you create applications and collaborate with other developers and their data sources, the more difficult it will be to integrate all the data sources into your applications. You might need different forms of authentication on the same application or maybe interact with other databases in one functional action provided by the application. For instance, an application that verifies a user's physical ID card by scanning it and comparing it against an external state-owned database.

Although you can use SQL Server Management System (SSMS) to manage databases across multiple servers, SSMS mainly allows you to interact with your databases graphically. Also, if you want to run complex operations on your databases for your application using SSMS, you will need to write complex T-SQL scripts to carry out operations like automation and custom alerts. Is there another way to interact with databases programmatically?

Instead of manually interacting with your application databases or writing T-SQL scripts to handle all the operational queries from your application, you can use SQLAlchemy to interact with your databases programmatically. SQLAlchemy is a high-level Object-Relational Mapping (ORM) library made for Python. It enables you to interact with multiple databases concurrently using asyncio's async/await method. This ORM also allows you to write RAW SQL queries in your Python script seamlessly using the Bindparam function.

SQLAlchemy is ideal for managing multiple databases programmatically, and it is even better if you work with Python-based applications. It can seamlessly integrate your Python applications with the databases. Since SQLAlchemy is an ORM, you can map your database tables and data to Python classes and objects. This feature allows you to interact naturally and effectively with your databases, especially when you run complex queries or operations against the databases for your applications.

This tip will discuss why SQLAlchemy is important for developers creating applications using Python or any compatible language.

What is SQLAlchemy?

SQLAlchemy is a Python library created to work with relational databases like PostgreSQL, MySQL, MariaDB, SQLite, Oracle, Microsoft SQL Server, and many more external dialect projects . The library offers an ORM tool that serves as a top layer on SQL, allowing Python code to interact with databases as objects. SQLAlchemy also enables you to execute queries on an SQL database using APIs.

SSMS and Native SQL Tools

  • Microsoft Ecosystem: Using SSMS and native SQL tools enables you to take full advantage of the Microsoft ecosystem. This makes integrating your databases with Microsoft applications easier and is great when working with an organization that uses Microsoft apps.
  • Security: Native tools have built-in security measures at every level of access.
  • Specialized Tools: Tools like SQL Server Profiler can help you monitor your server's performance.
  • Roles: You can easily share the server with other users and control access using built-in role permissions.
  • User Interface: The above-mentioned pros have a nice UI, making it easier to work with the tools.
  • Microsoft Dependency: Working seamlessly occurs only when using the Microsoft SQL Server Platform; using SQL Server databases cross-platform is challenging. Although you can manage multiple databases such as MySQL, PostgreSQL, and Cosmos DB using Azure Data Studio, you would be hindered from using many features designed to manage your databases, as shown below:

Database Administration features for Azure Data Studio compared to SSMS.

  • SSMS Resources: SSMS can use up plenty of PC resources. It uses up memory creating logs automatically and consumes a lot of CPU to run complex queries.
  • Cross-platform: Most tools are made for Windows, including SSMS. This makes it hard to carry the same workflow if you want to work with the same server on a Linux machine. However, Azure Data Studio can work cross-platform, as discussed above. This introduces some constraints to your database management and administration features.
  • Interaction style: Although the SSMS UI is a great platform to interact with your databases for both technical and non-technical users, it can be limiting when performing niche operations on your databases, such as reading data from a flat file or writing/updating data to a flat file.
  • Learning Curve: To run complex scripts, such as automation scripts, you must write them in T-SQL. If you are unfamiliar with T-SQL, you might find it has a long learning curve. This won't only extend the time it takes to complete your projects but also makes your scripts prone to errors and makes it harder to debug your applications and database operations. Furthermore, if you want to run administrative tasks in Azure Data Studio, it is recommended that you do this via the integrated terminal using SQLCMD or PowerShell.

When to Use SSMS and SQL Native Tools

It would be ideal to use SSMS and SQL tools when working on projects for an organization that uses the Microsoft ecosystem and when sharing servers with a team with different roles. SSMS makes database administration easy for both technical and non-technical users. Microsoft's Azure also allows you to scale your databases on the cloud. This is ideal if you want to use cloud storage and services for your projects. So, if you are looking to manage your organization's databases from a user-friendly GUI with ready-to-go functionality, you should consider sticking with SSMS and other native tools. SQLAlchemy is not meant to replace this purpose but is mainly to enable developers to have a simple way to interact with databases when developing applications.

  • Pythonic Style: If you are a Python developer, this is like a dream come true. Using Pythonic code, you can interact with your databases and sprinkle in some T-SQL to help you execute queries.
  • Core: SQLAlchemy has a Core component that houses a full SQL toolkit. The Core also provides an SQL Expression Language, which allows the expression of the SQL language via generative Python expressions.
  • Workflow: SQLAlchemy lets you fit all your database interactions into your project file, making the whole project flow naturally and intuitively for a Python developer.
  • Minimum Resources Usage: If you already have VS code installed, you only need to install the SQLAlchemy library and are ready to go. T-SQL queries are run using an API; there's no need for graphics and memory usage.
  • Cross-platform Databases: It supports different databases, making your project flexible on backend integrations.
  • ORM: SQLAlchemy creates an abstract layer between SQL and Python. This enables you to interact with the databases using Python classes, which makes data manipulation simple and straightforward for a developer. SQLAlchemy allows you to interact with your database tables like Python objects.
  • Code Reusability: SQLAlchemy's API enables developers to have reusable code across different databases, making the code easy to maintain across various projects.
  • Documentation: SQLAlchemy has a fantastic documentation page. Even if it is your first time on the page, you will appreciate the Pythonic style of all their code. The page covers all the functionality with working examples.
  • Security: SSMS is designed to simplify security with default graphics for access control, permissions, and user management. Using SQLAlchemy, you have to write code to manage these security issues.
  • User Interface: There is no UI when working with SQLAlchemy. This might not be a problem for developers who are used to working with the console, but it is not ideal for a developer or system admin who is comfortable using user interfaces to interact with databases. Code also needs to be written for the simplest operations that could have been accomplished by clicking a button on SSMS.
  • Performance: Since SQLAlchemy has an abstraction layer, SSMS has a slight advantage when performing certain operations. SSMS uses raw SQL, allowing you to interact directly with your databases.

When to Use SQLAlchemy

You should use SQLAlchemy if you are building applications that interact with SQL databases using Python or looking to manage multiple SQL databases programmatically to help you develop scripts for repetitive tasks and work with your database tables as objects.

You can also use SQLAlchemy when working alone or with a small team of people planning to have an elegant Python project with a simple, seamless workflow. SQLAlchemy is also great when you create a project that barely takes in any human input and relies mostly on APIs and integrating different API systems. Python's web frameworks, like Flask and Django, can be integrated with SQLAlchemy to communicate smoothly with the application's database. SQLAlchemy is database-agnostic, which enables you to write similar code to interact with different databases. With SQLAlchemy, you can power applications that interact with SQL, MySQL, PostgreSQL, and more databases seamlessly.

Since SQLAlchemy enables you to interact with your databases using Python classes, you can easily integrate your databases with other classes or functions in your code.

Most applications require the use of multiple databases scattered across different hosts. When you create applications using Python, it is important to ensure that how you interact with your databases fits into the ecosystem setup around the application. This allows your application to run smoothly and makes it easy to maintain. Consider all the points above before deciding to use SQLAlchemy or if you need SSMS and other SQL native tools, like Azure Data Studio, for your project.

  • Learn how to execute Python scripts in SSMS .
  • Run Python Scripts in a SQL Server Agent Job
  • Create SQL Server Notebooks in Azure Data Studio
  • Learn how to execute Python scripts in SSMS.
  • Azure Data Studio Step By Step Tutorial
  • Introduction to SQL Server's sqlcmd utility

sql server categories

About the author

MSSQLTips author Levi Masonde

Comments For This Article

get free sql tips

Related Content

How to Create SQL Server Objects Programmatically with SQLAlchemy for Python

How to Query SQL Data with Python pyodbc

Running a Python Application as a Windows Service

Query SQL Server with Python and Pandas

Introduction to Python including Installation, Jupyter Notebooks and Visual Studio Code

Connect to SQL Server with Python to Create Tables, Insert Data and Build Connection String

Introduction to Creating Interactive Data Visualizations with Python matplotlib in VS Code

Related Categories


Date Functions

System Functions

JOIN Tables

SQL Server Management Studio

Database Administration


Performance Tuning

Locking and Blocking

Data Analytics \ ETL

Microsoft Fabric

Azure Data Factory

Integration Services

Popular Articles

SQL Date Format Options with SQL CONVERT Function

SQL Date Format examples using SQL FORMAT Function


DROP TABLE IF EXISTS Examples for SQL Server

SQL Server Cursor Example

SQL CASE Statement in Where Clause to Filter Based on a Condition or Expression

Rolling up multiple rows into a single row and column for SQL Server data

SQL Convert Date to YYYYMMDD

SQL NOT IN Operator

Resolving could not open a connection to SQL Server errors

Format numbers in SQL Server

SQL Server PIVOT and UNPIVOT Examples

Script to retrieve SQL Server database backup history and no backups

How to install SQL Server 2022 step by step

An Introduction to SQL Triggers

Using MERGE in SQL Server to insert, update and delete at the same time

List SQL Server Login and User Permissions with fn_my_permissions

SQL Server Loop through Table Rows without Cursor

How to monitor backup and restore progress in SQL Server

SQL Server Database Stuck in Restoring State


  1. Back Up Database Task (Maintenance Plan)

    Use the Back Up Database Task dialog to add a backup task to the maintenance plan. Backing up the database is important in case of system or hardware failure, or user errors that cause the database to be damaged in some way, thus requiring a backed-up copy to be restored. This task allows you to perform full, differential, files and filegroups ...

  2. Getting Started with SQL Server Maintenance Plans

    SQL Server Maintenance Plan Wizard. The Maintenance Plan Wizard provides a user-friendly interface for creating database core maintenance tasks. Therefore, it is possible to create maintenance tasks quite easily using this tool. To do so, in SSMS we need to right click on "Maintenance Plans" under "Management" and then choose ''Maintenance ...

  3. Maintenance Tasks for SQL Server

    It creates scheduled jobs which are run by the SQL Server Agent and can perform the following tasks: Reorganize index pages. Rebuild indexes. Update statistics on the indexes. Shrink data and log files by removing empty pages. Backup database and transaction log. Perform internal consistency checks. Cleanup tasks.

  4. Backup Database Task in SQL Server Maintenance Plans

    Create SQL Server Maintenance Plan for Full Database Backups. Let's start with designing the full backup task by using the Maintenance Plan Wizard: After launching the wizard, we click "Next": Then we choose a name for our task and write a short description: After that, we click on "Change" to set a schedule:

  5. Tips and tricks for SQL Server database maintenance optimization

    In order this to take effect, we have to restart SQL Server otherwise the new indexes will still be created with the default fill factor of 0 or 100 %. Changed the setting without restarting SQL Server: Use again "AdventureWorksDW2012" database, table dbo.DimProduct without specifying the fill factor: 1. 2.

  6. Basics of SQL Server Task Automation

    Things to do. Now that you can automate basic database backup task s, please try the following to improve your skills:. S chedule this task to run every day in the afternoon for one week as a test; C reate a new table called Stats in the sample database with the following columns: . StatID (INT) StatDate (DATETIME2) TotalRows (INT) Now test yourself by creating an automate d task (new job) of ...

  7. SSIS Basics: Using the Execute SQL Task to Generate Result Sets

    We'll start by using the first Execute SQL task to retrieve the value and pass it to the EmpNum variable. To get started, drag the Execute SQL task onto the Control Flow design surface. Then double-click the task to open the Execute SQL Task Editor. The editor opens to the General page, as shown in Figure 5.

  8. 15 Essential Statements Covering 90% of Database Tasks

    In this article, we will explore a curated list of 15 SQL statements that encompass a vast majority of database tasks. Whether you're a SQL novice or an experienced user, mastering these ...

  9. Learn SQL Queries

    Dionysia Lemonaki. SQL stands for Structured Query Language and is a language that you use to manage data in databases. SQL consists of commands and declarative statements that act as instructions to the database so it can perform tasks. You can use SQL commands to create a table in a database, to add and make changes to large amounts of data ...

  10. SQL Server Maintenance Plan Shrink Database Task

    The "Shrink Database Task" in the SQL Server Maintenance Plan is designed especially for performing the above-mentioned process. In this article, we will use a Maintenance Plan to create a Shrink Database task. Solution. When a new database is created, the initial size of the data and log files are usually set to a small value. Additionally, if ...

  11. The Best Way to Learn SQL: A Complete Guide for Beginners

    One of the best ways to learn SQL is through interactive online courses. For instance, LearnSQL.com offers a course on SQL Basics that's perfect for beginners. This awesome online interactive SQL course teaches you the basics of SQL querying, including how to retrieve data from an SQL database and build simple reports.

  12. SSIS: Execute T-SQL Statement Task vs Execute SQL Task

    SSIS: Execute T-SQL Statement Task vs Execute SQL Task. T-SQL (Transact-SQL) is a set of SQL language programming extensions developed by Sybase and Microsoft. These extensions are adopted in Microsoft SQL Server and it provides a powerful set of functions to execute analytics and administrative commands; also it is very helpful during data ...

  13. Execute SQL Task in SSIS: Output Parameters vs Result Sets

    Figure 2 - Adding Parameter Mapping. Within Execute SQL Task in SSIS, you have to configure the following properties of each parameter: Variable Name: Select the variable name that you want to map to a parameter Direction: Specify if the type of the parameter (input, output, return value) Data Type: Specify the data type of the parameter (It must be compatible with the data type of the variable)

  14. Top 10 SQL Server DBA Daily Tasks List

    This list suggests 10 critical tasks SQL Server DBAs must do every day, towards ensuring healthy databases and SQL Server instances. Here's my list: Check SQL Server Instance Up-time. Check Last Full, Differential and Log Backup Times. Check Failed SQL Agent Jobs in the Last 24 Hours. Check Current Log for Failed Logins.

  15. Introduction to SQL and Databases

    Introduction to SQL and Databases. Knowing how to manipulate and access data is one the most in-demand job skills. SQL is one of the most-used programming languages for this task. Adding SQL skills will give you an advantage in almost any role you apply for from entry level all the way to the C-Suite. In this course, you'll learn how to write ...

  16. Automate database tasks for Azure SQL

    Modules in this learning path. Automate deployment of database resources. Explore multiple deployment models available on Azure. Use Azure Resource Manager (ARM) templates and Bicep files for deploying Azure SQL resources. Understand how to use PowerShell and Azure CLI for automation purposes. Create and manage SQL Agent jobs.

  17. How To Automate Tasks in Azure SQL Database

    By default, Automation operates on the control plane. This means you can operate on Azure resources or even within an Azure SQL Database using cmdlets from the Az.SQL module. In order to execute ...

  18. SQL Server Maintenance Plan Execute T-SQL and SQL Server Agent Job Tasks

    To execute the task, we can right click on the Maintenance Plan and select Execute or running the corresponding SQL Server Agent Job: After having the task successfully completed, we can check the results: To see and test the results, we can run the following query and monitor the data movement from TestTable to TestTableHistory: USE TestDB.

  19. 10 SQL Skills You Need to Know in 2024

    Conclusion. SQL skills are critical for professional growth in 2024. The ability to manipulate, analyze and draw insights from data using SQL provides a major advantage in many industries. Mastering skills like querying, data manipulation, joins, CTEs, and window functions can significantly advance your career.

  20. Oracle SQLcl version 24.1 is now available!

    Lots of bug fixes, a new command for backgrounding tasks, and HIGHLIGHTING is now on by default. Mostly Making oracle easy, mostly: ... I'm a product manager for Oracle Database, publishing tips and tricks for SQL Developer, SQLcl, Data Modeler, and REST Data Services (ORDS) X (Twitter) YouTube LinkedIn.

  21. How do I find the min, max, and peak timings of hydraulic conduit

    Analyzing the hydraulic performance of links (conduits) within an InfoWorks ICM model is crucial for understanding and optimizing the overall system behavior. However, manually extracting and processing this data can be a time-consuming and tedious task. This Knowledge Capture and Sharing (KCS) article presents a solution that leverages ICM SQL to provide a comprehensive overview of key ...

  22. SQLAlchemy vs SQL Server Management Studio for Database Tasks

    SQLAlchemy is a high-level Object-Relational Mapping (ORM) library made for Python. It enables you to interact with multiple databases concurrently using asyncio's async/await method. This ORM also allows you to write RAW SQL queries in your Python script seamlessly using the Bindparam function.