Oracle同一个表名不同的模式? [英] Oracle same table name on different schema?

查看:540
本文介绍了Oracle同一个表名不同的模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可能在不同架构上具有相同的表名称,而在一个数据库中的表上具有不同的数据?我想,而不是创建多个数据库(拥有相同的表名),我应该创建多个模式。

Is it possible to have same table name on different schema with different data on the tables within the one database? I think rather than create multiple database (that hold same table name) i should create multiple schema instead.

像:


Schema 1:
  table A, table B
Schema 2:
  table B, table X

PS: table B hold different data for each schema

最基本的问题是每个模式(用户)保持不同的表集?在SQL Server和MySQL中,每个用户在同一个数据库上具有相同的表集,差异只在角色上,Oracle如何?

And most basic question did every schema (user) hold different table set? In SQL Server and MySQL every user on same database have same table set, the difference was only on roles, how about Oracle?

感谢

推荐答案

Oracle中的模式是MySQL用户调用数据库的方式。

Yes this is possible. A schema in Oracle is what a MySQL user would call a database.

但是,如果您连接的用户访问任何一个表,数据库实例具有对这两者的访问权。要明确地引用特定模式中的表,请使用 schema.table

However, you need to be careful when accessing either of the tables now if the user you connect with to the database instance has access to both. To unambiguously reference a table in a specific schema, use schema.table.

这篇关于Oracle同一个表名不同的模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆