lealone / Lealone

比 MySQL 和 MongoDB 快10倍的 OLTP 关系数据库和文档数据库
Other
2.44k stars 513 forks source link

你好 我用use database命令切换不了数据库是什么原因?谢谢 #80

Closed yh3434 closed 7 years ago

yh3434 commented 7 years ago

sql> show databases; DATABASE_NAME TEST lealone MYDB (3 rows, 52 ms)

sql> use TEST; Error: org.lealone.common.exceptions.JdbcSQLException: General error: "org.lealone.common.exceptions.LealoneException: org.lealone.common.exceptions.DbException: [Server] Schema ""TEST"" not found; SQL statement: use TEST [90079-0]" [50000-0]

codefollower commented 7 years ago

Lealone跟MySQL不一样 在MySQL里,database和schema是同一个东西,而Lealone不是

所以show databases和show schemas会得到不同的结果 use命令只能用来切换当前数据库下的某个schema。

每个RDBMS的数据库对象模型都会有差异的, Lealone的数据库对象模型跟H2和PostgreSQL类似。

yh3434 commented 7 years ago

好的,谢谢。