写了这个脚本:
static void schema()
{
Sql.newInstance(*DB_CONFIG, DB_DRIVER).execute('''
drop table if exists post;
drop table if exists author;
create table author(
id integer primary key,
name varchar(500)
);
create table post(
id integer primary key,
title varchar(500),
text longvarchar,
author integer not nul,
foreign key(author) references author(id)
);
''')
}
开始后,我看到了:
“警告:执行失败:因为:ORA-00933:SQL 命令未正确结束”
我正在使用 Oracle 11g 2 数据库和 oracle jdbc 驱动程序。