File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5177,7 +5177,7 @@ impl<'a> Parser<'a> {
51775177 /// DROP TRIGGER [ IF EXISTS ] name ON table_name [ CASCADE | RESTRICT ]
51785178 /// ```
51795179 pub fn parse_drop_trigger(&mut self) -> Result<Statement, ParserError> {
5180- if !dialect_of!(self is PostgreSqlDialect | GenericDialect | MySqlDialect) {
5180+ if !dialect_of!(self is PostgreSqlDialect | GenericDialect | MySqlDialect | MsSqlDialect ) {
51815181 self.prev_token();
51825182 return self.expected("an object type after DROP", self.peek_token());
51835183 }
Original file line number Diff line number Diff line change @@ -2038,3 +2038,18 @@ fn parse_mssql_merge_with_output() {
20382038 OUTPUT $action, deleted.ProductID INTO dsi.temp_products";
20392039 ms_and_generic().verified_stmt(stmt);
20402040}
2041+
2042+ #[test]
2043+ fn parse_drop_trigger() {
2044+ let sql_drop_trigger = "DROP TRIGGER emp_stamp;";
2045+ let drop_stmt = ms().one_statement_parses_to(sql_drop_trigger, "");
2046+ assert_eq!(
2047+ drop_stmt,
2048+ Statement::DropTrigger {
2049+ if_exists: false,
2050+ trigger_name: ObjectName::from(vec![Ident::new("emp_stamp")]),
2051+ table_name: None,
2052+ option: None,
2053+ }
2054+ );
2055+ }
You can’t perform that action at this time.
0 commit comments