Skip to content

Commit aec8251

Browse files
committed
Update UpdateTest.java
Add an SQL test for Update with Select
1 parent 8321aae commit aec8251

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/test/java/net/sf/jsqlparser/test/update/UpdateTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,9 @@ public void testUpdateWithFrom() throws JSQLParserException {
5555
public void testUpdateMultiTable() throws JSQLParserException {
5656
assertSqlCanBeParsedAndDeparsed("UPDATE T1, T2 SET T1.C2 = T2.C2, T2.C3 = 'UPDATED' WHERE T1.C1 = T2.C1 AND T1.C2 < 10");
5757
}
58+
59+
@Test
60+
public void testUpdateWithSelect() throws JSQLParserException {
61+
assertSqlCanBeParsedAndDeparsed("UPDATE NATION SET (N_NATIONKEY) = (SELECT ? FROM SYSIBM.SYSDUMMY1)");
62+
}
5863
}

0 commit comments

Comments
 (0)