Skip to content
Related Articles

Related Articles

AWS DynamoDB – PartiQL Delete Statements For DynamoDB

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 08 Feb, 2022

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:

  • Table name: Required – Name of the table in which you want to insert data.
  • Condition: Required – The criteria for the item that needs to be deleted.

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: 

  • AWS Account
  • DynamoDB table

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.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!