How to perform CRUD operations using Database block in Leapwork
How to perform CRUD operations using Database block in Leapwork
Introduction While performing the back-end testing using the Databases, the most common operations performed over the databases are Create, Read, Update and Delete which are often acronym as CRUD operations.
In Leapwork, users can perform these operations and manipulate the databases using the Database building block in Leapwork.
Note: For using the Database block to perform CRUD operations, Please make sure that the ODBC DSN is configured for the database, which can be used by the Database block in Leapwork. To know more about this please Click here .
CREATE
The first letter of CRUD, ‘ C’, refers to CREATE i.e insert. In this operation, a new record is inserted using the SQL command. SQL uses INSERT INTO statement to create new records within the table.
READ
The second letter of CRUD, ‘ R’, refers to SELECT operation. The word ‘read’ retrieves record(s) from the table(s). SQL uses the SELECT command to retrieve the data.
UPDATE
The third letter of CRUD, ‘ U’, refers to UPDATE operation. Using the Update keyword, SQL brings a change to an existing record(s) of the table.
DELETE
The last letter of the CRUD operation is ‘ D’ and it refers to removing a record from the table. SQL uses the SQL DELETE command to delete the record(s) from the table.
If you have any questions, please reach out to our Priority Support team.