# Tag example for sql file

**URL:** <https://forum.liquibase.org/t/tag-example-for-sql-file/8927>\
**Category:** Uncategorized\
**Created:** [December 21, 2023, 9:27am UTC](https://forum.liquibase.org/t/tag-example-for-sql-file/8927 "2023-12-21T09:27:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Venkata](https://avatars.discourse-cdn.com/v4/letter/v/f4b2a3/32.png) [@Venkata](https://forum.liquibase.org/u/Venkata)\
**Post date:** [December 21, 2023, 9:27am UTC](https://forum.liquibase.org/t/tag-example-for-sql-file/8927/1 "2023-12-21T09:27:32Z")

</div>

We use sql file to specify chnageset, i use below syntax for tags,but it is not saving satabasechangelog table and rollback through tag is never happending.iam using liquibase core -4.20.0 jar,pls suggets how i can add tags to changeset  
– changeset your\_author:changeset1  
CREATE TABLE example\_table1 (  
id INT PRIMARY KEY,  
name VARCHAR(255)  
);  
– tag::rollback-changeset1  
– rollback SQL for changeset1  
DROP TABLE example\_table1;  
– end::rollback-changeset1

---

<div class="post-metadata">

**Author:** ![daryldoak](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/daryldoak/32/764_2.png) [@daryldoak](https://forum.liquibase.org/u/daryldoak)\
**Post date:** [December 21, 2023, 2:27pm UTC](https://forum.liquibase.org/t/tag-example-for-sql-file/8927/2 "2023-12-21T14:27:24Z")

</div>

As far as I know, tagging is not supported in sql format. You need to either user the “tagDatabase” change-type in xml, yaml, or json:

> **[tagDatabase](https://docs.liquibase.com/change-types/tag-database.html)**
>
> Reference information for the tagDatabase change type. The tagDatabase change type applies a tag to the database for future rollback.

Or use the Liquibase “tag” command:

> **[tag](https://docs.liquibase.com/commands/change-tracking/tag.html)**
>
> Reference information and use cases for the tag command. The tag command command marks the current database state so you can roll back or deploy changes in the future.

---

<div class="post-metadata">

**Author:** ![Venkata](https://avatars.discourse-cdn.com/v4/letter/v/f4b2a3/32.png) [@Venkata](https://forum.liquibase.org/u/Venkata)\
**Post date:** [December 21, 2023, 2:53pm UTC](https://forum.liquibase.org/t/tag-example-for-sql-file/8927/3 "2023-12-21T14:53:10Z")

</div>

Thank you…I am using springLiquibase and latest liquibase-core 4.20.0 jar doesn’t support rollback via changesetId,any suggestions for this…  
Also if I want to do rollback from cahngesetid,what is the liquibase command I need to run.Please help to give one example,so that I will follow.
