In this article, we will learn how to query SQL database using UiPath. SQL is used to create, maintain and retrieve the relational database. Process automation with SQL is common use case which involve retrieving data from databases through queries. Let’s understand how to connect and query using UiPath.
We are using AdventureWorks Database in this tutorial. This is Microsoft product sample for an online transaction processing (OLTP) database. The AdventureWorks Database supports a fictitious, multinational manufacturing company called Adventure Works Cycles. You can download it from here.
Prerequisites: You will need to have database activities package installed in UiPath studio. You can install these activities using package manager.
Using database activities, we can query SQL database and get results in the data table using ‘Execute Query’ activity. If it’s required to execute INSERT, UPDATE, DELETE queries, we have to use ‘Execute Non Query’ activity in similar way. This activity returns number of rows affected.