Redshift Transaction Management – BEGIN, COMMIT, ROLLBACK

In a Redshift, transaction is a series of one or more operations on database objects and/or data. The transaction management is process of ensuring the transaction is successfully completed and committed in the Redshift database schema. In this article, we will discuss about the Amazon Redshift transaction management using BEGIN, COMMIT and ROLLBACK. We will check how transaction management works inside Redshift stored procedures. Page Content Introduction Redshift Transaction Management Redshift BEGIN Command Redshift BEGIN Syntax and Example Redshift COMMIT Command Redshift COMMIT Syntax and Example Redshift ROLLBACK Command Redshift…

Continue ReadingRedshift Transaction Management – BEGIN, COMMIT, ROLLBACK
Comments Off on Redshift Transaction Management – BEGIN, COMMIT, ROLLBACK

Redshift RECORD Type, Usage and Examples

Similar to other procedural language, such as nzplsql, Redshift plpgsql supports RECORD variables. The Redshift RECORD type variable is similar to row types, but they have no predefined structure associated with it. Record type variables can be used inside Redshift stored procedures. They are used in selections or FOR loops to hold one row from a SELECT operation. Redshift RECORD Type Variable A RECORD in Redshift plpgsql is not a true data type, but only a placeholder. Record type variables assume the actual row structure of the row that they…

Continue ReadingRedshift RECORD Type, Usage and Examples
Comments Off on Redshift RECORD Type, Usage and Examples

How to Create and Use Redshift Cursor Variable? – Examples

Just like many other SQL procedural languages, the latest version of Redshift plpgsql supports cursor type variables. You can use a cursor to retrieve a few rows at a time from the result set of a larger query. You can use the cursor type inside Redshift stored procedures (SP). They are used in selections and FOR loops to hold one row from a SELECT operation. In this article, we will check how to create and use Redshift cursor variable inside your stored procedure. Redshift Cursor Variable As mentioned earlier, Redshift…

Continue ReadingHow to Create and Use Redshift Cursor Variable? – Examples
Comments Off on How to Create and Use Redshift Cursor Variable? – Examples