提交 a15ea645 authored 作者: plus33's avatar plus33

Added more test cases for drop-column with brackets (Oracle style)

上级 db9406e2
...@@ -117,10 +117,11 @@ public class TestAlter extends TestBase { ...@@ -117,10 +117,11 @@ public class TestAlter extends TestBase {
stat.execute("alter table test drop column name, name2"); stat.execute("alter table test drop column name, name2");
stat.execute("drop table test"); stat.execute("drop table test");
// Test-Case: Same as above but using brackets (Oracle style) // Test-Case: Same as above but using brackets (Oracle style)
stat.execute("create table test(id int, name varchar, name2 varchar)"); stat.execute("create table test(id int, b varchar, c int, d int)");
stat.execute("alter table test drop column (name, name2)"); stat.execute("alter table test drop column (b, c)");
assertThrows(ErrorCode.COLUMN_NOT_FOUND_1, stat). assertThrows(ErrorCode.COLUMN_NOT_FOUND_1, stat).
execute("alter table test drop column name"); execute("alter table test drop column b");
stat.execute("alter table test drop (d)");
stat.execute("drop table test"); stat.execute("drop table test");
// Test-Case: Error if dropping all columns // Test-Case: Error if dropping all columns
stat.execute("create table test(id int, name varchar, name2 varchar)"); stat.execute("create table test(id int, name varchar, name2 varchar)");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论