Create a stream on a dynamic table

You can use a dynamic table as the source of a stream, like streams on regular tables, with the following limitations:

  • Refresh mode: Streams can be created only on dynamic tables that refresh incrementally. Full refresh dynamic tables aren’t supported because they completely rewrite the table on every refresh.
  • Stream type: Dynamic tables support only standard (that is, delta) streams. For more information, see Types of streams.

The following example shows how to create a stream on a dynamic table:

-- Create the dynamic table, for reference only
CREATE OR REPLACE DYNAMIC TABLE product ...;

-- Create the stream.
CREATE OR REPLACE STREAM deltaStream ON DYNAMIC TABLE product;