mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
sqlserver支持alter table add default with values
This commit is contained in:
@@ -4814,6 +4814,12 @@ public class SQLExprParser extends SQLParser {
|
||||
accept(Token.FOR);
|
||||
sqlDefault.setColumn(this.expr());
|
||||
|
||||
if (lexer.token == Token.WITH) {
|
||||
lexer.nextToken();
|
||||
accept(Token.VALUES);
|
||||
sqlDefault.setWithValues(true);
|
||||
}
|
||||
|
||||
return sqlDefault;
|
||||
}
|
||||
|
||||
|
||||
@@ -1838,6 +1838,10 @@ public class SQLStatementParser extends SQLParser {
|
||||
|
||||
break;
|
||||
}
|
||||
} else if (lexer.token == DEFAULT) {
|
||||
SQLConstraint constraint = this.exprParser.parseConstaint();
|
||||
SQLAlterTableAddConstraint item = new SQLAlterTableAddConstraint(constraint);
|
||||
stmt.addItem(item);
|
||||
} else {
|
||||
throw new ParserException("TODO " + lexer.info());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user