Skip to content

Commit ca76fed

Browse files
committed
1 parent 3f91850 commit ca76fed

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,16 @@ public void testExists() throws JSQLParserException {
11911191
PlainSelect plainSelect = (PlainSelect) ((Select) parsed).getSelectBody();
11921192
assertExpressionCanBeDeparsedAs(plainSelect.getWhere(), where);
11931193
}
1194+
1195+
@Test
1196+
public void testNotExists() throws JSQLParserException {
1197+
assertSqlCanBeParsedAndDeparsed( "SELECT * FROM tab1 WHERE NOT EXISTS (SELECT * FROM tab2)");
1198+
}
1199+
1200+
@Test
1201+
public void testNotExistsIssue() throws JSQLParserException {
1202+
assertSqlCanBeParsedAndDeparsed( "SELECT * FROM t001 t WHERE NOT EXISTS (SELECT * FROM t002 t1 WHERE t.c1 = t1.c1 AND t.c2 = t1.c2 AND ('241' IN (t1.c3 || t1.c4)))");
1203+
}
11941204

11951205
@Test
11961206
public void testOrderBy() throws JSQLParserException {

0 commit comments

Comments
 (0)