You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* This class is used to create a Table in HSQLDB database
*/
public class CreateTableTest {
@Test
public void testCreateTable() {
Connection con = null;
Statement stmt = null;
int result = 0;
try {
Class.forName("org.hsqldb.jdbcDriver");
con = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/reminderservdb", "sa", "");
stmt = con.createStatement();
String create = "CREATE MEMORY TABLE PUBLIC.REMINDER(ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL, NAME VARCHAR(50)NOT NULL, DESCRIPTION VARCHAR(200), DUE_DATE BIGINT NOT NULL, STATUS VARCHAR(20) NOT NULL, CONSTRAINT PKID PRIMARY KEY(ID))" ;
result = stmt.executeUpdate(create);
} catch (Exception e) {
e.printStackTrace(System.out);
Assert.assertEquals(result, 1, "Table REMINDER creation is failed!");