Automating scenarios using SQL and validating the response received from SQL query is very simple using NoCodeBDD.
Steps to automate a scenario containing an SQL query
- Define your feature, scenario, and steps.
- Click New Step Definition and then select SQL module.
![](http://nocodebdd.com/wp-content/uploads/2022/08/db-2-800x377.png)
- To execute any SQL queries, select the Run SQL query option.
![](http://nocodebdd.com/wp-content/uploads/2022/08/db-3-800x373.png)
- To Add the connection details, select Add Connection and fill in all the details.
![](http://nocodebdd.com/wp-content/uploads/2022/08/db-4-800x375.png)
- Write the required SQL query to be executed.
![](http://nocodebdd.com/wp-content/uploads/2022/08/db-5-800x372.png)
- If you want to assert the details, then Fetch the details from the table.
![](http://nocodebdd.com/wp-content/uploads/2022/08/db-6-800x373.png)
- In the next step, select Assert SQL Response and provide the column name and expected value for the column.
![](http://nocodebdd.com/wp-content/uploads/2022/08/db-7-800x371.png)
You can run the scenario to validate the results from SQL.
The following video shows how to query and validate SQL responses using NoCodeBDD.