Skip to content

Commit e7dc8d0

Browse files
committed
additional test case
1 parent 4ac2d7c commit e7dc8d0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ select a from taba minus select b from tabb
4747
```sql
4848
insert taba (col1,col2) values (1,2), (2,5), (3,20)
4949
```
50+
* Added support for multi values in select statement
51+
```sql
52+
SELECT col FROM (VALUES 1,2) AS MY_TABLE(col)
53+
```
5054

5155
## BUILDING
5256

src/test/java/net/sf/jsqlparser/test/select/SelectTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,11 @@ public void testValues4() throws JSQLParserException {
785785
String stmt = "SELECT * FROM (VALUES (1, 2), (3, 4)) AS test(a, b)";
786786
assertSqlCanBeParsedAndDeparsed(stmt);
787787
}
788+
789+
public void testValues5() throws JSQLParserException {
790+
String stmt = "SELECT X, Y FROM (VALUES (0, 'a'), (1, 'b')) AS MY_TEMP_TABLE(X, Y)";
791+
assertSqlCanBeParsedAndDeparsed(stmt);
792+
}
788793

789794
private void assertSqlCanBeParsedAndDeparsed(String statement) throws JSQLParserException {
790795
Statement parsed = parserManager.parse(new StringReader(statement));

0 commit comments

Comments
 (0)