# Deletion instruction at the beginning of SQL-DDL code for triggers (DROP TRIGGER)

**URL:** <https://forums.visual-paradigm.com/t/deletion-instruction-at-the-beginning-of-sql-ddl-code-for-triggers-drop-trigger/17015>\
**Category:** Plug-in & Open API\
**Tags:** database, modeling, erd\
**Created:** [September 6, 2021, 7:02pm UTC](https://forums.visual-paradigm.com/t/deletion-instruction-at-the-beginning-of-sql-ddl-code-for-triggers-drop-trigger/17015 "2021-09-06T19:02:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArberSmajli](https://avatars.discourse-cdn.com/v2/letter/a/d6d6ee/32.png) [@ArberSmajli](https://forums.visual-paradigm.com/u/ArberSmajli)\
**Post date:** [September 6, 2021, 7:02pm UTC](https://forums.visual-paradigm.com/t/deletion-instruction-at-the-beginning-of-sql-ddl-code-for-triggers-drop-trigger/17015/1 "2021-09-06T19:02:29Z")

</div>

Good evening ladies and gentlemen,

I’m a student and I’m currently finishing my bachelor’s work on the improvement of a plugin on VisualParadigm.

I’m writing to you to get some information because when I try to generate the SQL-DDL code of a trigger I always get this first line :

`IF EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'test')) DROP TRIGGER test`

While I have not indicated it anywhere in the plugin. So I deduced that it was VisualParadigm that integrated this line of code automatically when generating a trigger.

Does anyone know how to remove it?  
It would be very useful for me.

For information, I generate SQL-DDL code for SQL Server databases.

I thank you and wish you all a good evening.

---

<div class="post-metadata">

**Author:** ![Jick](https://avatars.discourse-cdn.com/v2/letter/j/ea666f/32.png) [@Jick](https://forums.visual-paradigm.com/u/Jick)\
**Post date:** [September 8, 2021, 2:37am UTC](https://forums.visual-paradigm.com/t/deletion-instruction-at-the-beginning-of-sql-ddl-code-for-triggers-drop-trigger/17015/2 "2021-09-08T02:37:19Z")

</div>

Hi ArberSmajli,

Thank you for your post. I have forwarded your question to our team to study. When there is an answer, I will let you know.

Best regards,  
Jick Yeung
