我是 Hsql 新手,
我尝试运行一个脚本:
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'table') AND type in (N'U'))
BEGIN
DROP TABLE table
END ;
Hsql 抱怨 IF 关键字:
Caused by: java.sql.SQLSyntaxErrorException: unexpected token: IF : line: 2
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)
at org.hsqldb.jdbc.JDBCStatement.executeQuery(Unknown Source)
任何人都可以帮助我吗?