# CREATE TABLE AS SELECT - EMIT CHANGES vs. dont emit changes

**URL:** <https://forum.confluent.io/t/create-table-as-select-emit-changes-vs-dont-emit-changes/5384>\
**Category:** ksqlDB\
**Created:** [24 June 2022 14:53 UTC](https://forum.confluent.io/t/create-table-as-select-emit-changes-vs-dont-emit-changes/5384 "2022-06-24T14:53:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucasprograms](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/lucasprograms/32/2455_2.png) [@lucasprograms](https://forum.confluent.io/u/lucasprograms)\
**Post date:** [24 June 2022 14:53 UTC](https://forum.confluent.io/t/create-table-as-select-emit-changes-vs-dont-emit-changes/5384/1 "2022-06-24T14:53:07Z")

</div>

The examples in the [CREATE TABLE AS SELECT docs](https://docs.ksqldb.io/en/latest/developer-guide/ksqldb-reference/create-table-as-select/) all include `EMIT CHANGES`, but there is not any detail on what that means in this context.

In my local testing, they seem to capture the same data. Since a table is a persistent query regardless, it’s unclear to me what difference `EMIT CHANGES` makes.

What are the differences between a table that is defined as  
`CREATE TABLE AS SELECT ... EMIT CHANGES;`  
vs  
`CREATE TABLE AS SELECT ...;`

Thank you!

---

<div class="post-metadata">

**Author:** ![mjsax](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mjsax/32/3113_2.png) [@mjsax](https://forum.confluent.io/u/mjsax)\
**Post date:** [24 June 2022 15:53 UTC](https://forum.confluent.io/t/create-table-as-select-emit-changes-vs-dont-emit-changes/5384/2 "2022-06-24T15:53:54Z")

</div>

`EMIT CHANGES` is an optional clause for `CTAS` and `CSAS` statement.

---

<div class="post-metadata">

**Author:** ![lucasprograms](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/lucasprograms/32/2455_2.png) [@lucasprograms](https://forum.confluent.io/u/lucasprograms)\
**Post date:** [24 June 2022 15:56 UTC](https://forum.confluent.io/t/create-table-as-select-emit-changes-vs-dont-emit-changes/5384/3 "2022-06-24T15:56:18Z")

</div>

@mjsax thank you for the reply. Does that mean that it does not have an effect in CSAS/CTAS?

---

<div class="post-metadata">

**Author:** ![mjsax](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mjsax/32/3113_2.png) [@mjsax](https://forum.confluent.io/u/mjsax)\
**Post date:** [27 June 2022 17:21 UTC](https://forum.confluent.io/t/create-table-as-select-emit-changes-vs-dont-emit-changes/5384/4 "2022-06-27T17:21:48Z")

</div>

Right. For `CSAS/CTAS` both queries with and without `EMIT CHANGES` clause are exactly the same.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [4 July 2022 17:22 UTC](https://forum.confluent.io/t/create-table-as-select-emit-changes-vs-dont-emit-changes/5384/5 "2022-07-04T17:22:26Z")

</div>

Closed on 4 July 2022 17:22 UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
