Open In App

AWS DynamoDB – PartiQL Delete Statements For DynamoDB

PartiQL is a SQL-compatible query language that supports querying, modifying, and inserting data. It makes it easier to interact with DynamoDB and run queries in AWS Management Console.

Delete data in DynamoDB Table using PartiQL:

Syntax:  



DELETE FROM table-name WHERE condition;

Parameters:

Example:



DELETE FROM Books WHERE  
“BookName” = ‘ABC’ AND “Author” = ‘EFG’ ;

Note: Updates and Deletes cannot be processed in bulk, You can only delete one record in one operation.

Using PartiQL in AWS Management Console:

Pre – Requisites: 

Implementation:

Step 1: Login into your AWS account. Search for “DynamoDB” which will be present under “Services”, select it.

Step 2: Once you are directed to the DynamoDB Management Console, on the left side there is PartiQL editor, select it.

Step 3: After you are directed to the PartiQL editor, Select the table that you want to delete data from.  

Step 4: Type the Query in the editor and click on run, it should be executed successfully.

Step 5: The record gets deleted from the table, and the delete operation is completed.

Article Tags :