1

I am trying to check if a schema that I have created exists. I am trying to use this line to check. I get an error saying " Lexical error at line 1, column 23. Encountered: "\" (92), after : "". "

Here is the line of code that I use:

statement.execute("SELECT " + schema + " FROM "+ dbName + ".SCHEMATA WHERE SCHEMA_NAME = " + "'" + schema + "'");

I am making a connection just fine and the Database defiantly exists. The dbName is :

"C:/.testing/DerbyDB/AssetDB"

What am I doing wrong here?

4

1 回答 1

3

老问题,但这是第一个结果,所以我不妨回应一下。

从 SYS.SYSSCHEMAS 中选择 *

而且 Derby 确实支持模式,至少在我正在使用的 v10.8 上。

于 2014-02-15T16:30:50.457 回答