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 @@ -2036,3 +2036,18 @@ fn parse_mssql_merge_with_output() {
20362036 OUTPUT $action, deleted.ProductID INTO dsi.temp_products";
20372037 ms_and_generic ( ) . verified_stmt ( stmt) ;
20382038}
2039+
2040+ #[ test]
2041+ fn parse_drop_trigger ( ) {
2042+ let sql_drop_trigger = "DROP TRIGGER emp_stamp;" ;
2043+ let drop_stmt = ms ( ) . one_statement_parses_to ( sql_drop_trigger, "" ) ;
2044+ assert_eq ! (
2045+ drop_stmt,
2046+ Statement :: DropTrigger {
2047+ if_exists: false ,
2048+ trigger_name: ObjectName :: from( vec![ Ident :: new( "emp_stamp" ) ] ) ,
2049+ table_name: None ,
2050+ option: None ,
2051+ }
2052+ ) ;
2053+ }
You can’t perform that action at this time.
0 commit comments