请问oracle表名中的前缀、后缀的含义
请教oracle表名中的前缀、后缀的含义。
在oracle中表名的前缀、后缀是什么意思,哪位高手给详细解释一下。
如:select * from abc.tablename@def 中abc、def分别是什么意思?
(似乎def是数据库名字,但abc是什么意思呢?)
多谢!
------解决思路----------------------
用户名,表明你查询的表是属于哪个用户
------解决思路----------------------
abc是schema,oracle中的模块,通常是指数据库的用户,def是oracle中的dblink,创建dblink用于配置数据库连接的别名,sql的意思是在查询def库中abc用户下的表
------解决思路----------------------
楼上是对的。
------解决思路----------------------
+1
------解决思路----------------------
+1
------解决思路----------------------
+2
鸟语花香啊
------解决思路----------------------
select * from abc.tablename@def
ABC是SCHEMA 也可以说是用户名。TABLENAME是表名 DEF是DBLINK的名称
是你要访问DEF库下面的ABC.用户下的表
在oracle中表名的前缀、后缀是什么意思,哪位高手给详细解释一下。
如:select * from abc.tablename@def 中abc、def分别是什么意思?
(似乎def是数据库名字,但abc是什么意思呢?)
多谢!
------解决思路----------------------
用户名,表明你查询的表是属于哪个用户
------解决思路----------------------
abc是schema,oracle中的模块,通常是指数据库的用户,def是oracle中的dblink,创建dblink用于配置数据库连接的别名,sql的意思是在查询def库中abc用户下的表
------解决思路----------------------
楼上是对的。
------解决思路----------------------
+1
Oracle Database uses the global database name to name the schema objects globally using the following scheme:
schema.schema_object@global_database_name
where:
schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same name as that user. Each user owns a single schema.
schema_object is a logical data structure like a table, index, view, synonym, procedure, package, or a database link.
global_database_name is the name that uniquely identifies a remote database. This name must be the same as the concatenation of the remote database initialization parameters DB_NAME and DB_DOMAIN, unless the parameter GLOBAL_NAMES is set to FALSE, in which case any name is acceptable.
For example, using a database link to database sales.division3.acme.com, a user or application can reference remote data as follows:
SELECT * FROM scott.emp@sales.division3.acme.com; # emp table in scott's schema
SELECT loc FROM scott.dept@sales.division3.acme.com;
If GLOBAL_NAMES is set to FALSE, then you can use any name for the link to sales.division3.acme.com. For example, you can call the link foo. Then, you can access the remote database as follows:
SELECT name FROM scott.emp@foo; # link name different from global name
------解决思路----------------------
+1
------解决思路----------------------
+2
鸟语花香啊
------解决思路----------------------
select * from abc.tablename@def
ABC是SCHEMA 也可以说是用户名。TABLENAME是表名 DEF是DBLINK的名称
是你要访问DEF库下面的ABC.用户下的表