# Tag changset in sql format

**URL:** <https://forum.liquibase.org/t/tag-changset-in-sql-format/2922>\
**Category:** General Discussion\
**Created:** [February 18, 2014, 3:55pm UTC](https://forum.liquibase.org/t/tag-changset-in-sql-format/2922 "2014-02-18T15:55:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [February 18, 2014, 3:55pm UTC](https://forum.liquibase.org/t/tag-changset-in-sql-format/2922/1 "2014-02-18T15:55:00Z")

</div>

Formatted SQL does not attempt to handle any logical change command including tag, it only supports raw sql.

Currently the command to tag the database depends on the database type, but is basically:

1. update databasechangelog set&nbsp;tag='YOUR\_TAG' where dateexecuted = (select max(dateexecuted) from databasechangelog);

which you could call directly from the sql file

Nathan

---

<div class="post-metadata">

**Author:** ![un1392709972919r9id](https://avatars.discourse-cdn.com/v4/letter/u/6de8d8/32.png) [@un1392709972919r9id](https://forum.liquibase.org/u/un1392709972919r9id)\
**Post date:** [February 18, 2014, 3:55pm UTC](https://forum.liquibase.org/t/tag-changset-in-sql-format/2922/2 "2014-02-18T15:55:00Z")

</div>

Ok, thanks. I would like to use sql format and have some features from xml (tag, preconditions, context etc.). Is it good practice to write changesets in xml and sql command&nbsp;always&nbsp;insert into sql tag?

Example:

1. 

Thank you.

---

<div class="post-metadata">

**Author:** ![slechtic1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/slechtic1/32/123_2.png) [@slechtic1](https://forum.liquibase.org/u/slechtic1)\
**Post date:** [February 18, 2014, 3:55pm UTC](https://forum.liquibase.org/t/tag-changset-in-sql-format/2922/3 "2014-02-18T15:55:00Z")

</div>

Hi,

is it possible to tag changeset in sql format? I found out it is posible in other format&nbsp;[http://www.liquibase.org/documentation/changes/tag\_database.html](http://www.liquibase.org/documentation/changes/tag_database.html) but sql format is missing.

Thank you.

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [February 18, 2014, 3:55pm UTC](https://forum.liquibase.org/t/tag-changset-in-sql-format/2922/4 "2014-02-18T15:55:00Z")

</div>

Yes, that would be the best way to have a mix of raw sql with xml-changeset functionality.

Nathan
