CREATE[ORREPLACE][PUBLIC]SYNONYM[synonym_schema.]synonym_nameFOR[object_schema.]object_name; 参数说明 参数描述 OR REPLACE表示如果要创建的同义词名称已存在,则使用新的定义重新创建同义词。 PUBLIC指定PUBLIC来创建公共同义词,所有用户都可以使用。用户必须对基础对象具有相应的权限才能使用该同义词。 在解析对象...
synonym_name指定同义词的名称。 object_schema指定创建同义词的对象所在的 Schema。如果省略schema.,则默认创建同义词的对象在您自己的 Schema 中。 object_name指定同义词对应对象的名称。 示例 创建表的同义词。 obclient>CREATETABLEtbl1(col1INT,col2INT);Query OK,0rowsaffected obclient>CREATESYNONYM syn1FO...
CREATE PUBLIC SYNONYM PUBLIC_TEST FOR TEST; 如果要创建一个远程的数据库上的某张表的同义词,需要先创建一个Database Link(数据库连接)来扩展访问,然后再使用如下语句创建数据库同义词:create synonym table_name for table_name@DB_Link; 公共同义词是和用户的schema无关的,但是公共的意思并不是所有的用户都可...
Use theCREATESYNONYMstatement to create asynonym, which is an alternative name for a table, view, sequence, procedure, stored function, package, materialized view, Java class schema object, user-defined object type, or another synonym. Synonyms provide both data independence and location transparency...
不需要基对象的权限便可成功编译CREATE SYNONYM语句,因为基对象的所有权限检查被延迟到运行时进行。 示例 A. 为本地对象创建同义词 下面的示例首先为Product数据库中的基对象AdventureWorks2022创建同义词,然后查询该同义词。 SQL -- Create a synonym for the Product table in AdventureWorks2022.CREATESYNONYMMyProduct...
SQL 複製 -- Create a synonym for the Product table in AdventureWorks2022. CREATE SYNONYM MyProduct FOR AdventureWorks2022.Production.Product; GO -- Query the Product table by using the synonym. SELECT ProductID, Name FROM MyProduct WHERE ProductID < 5; GO ...
使用create or replace synonym s_sy for mytable; 可以为表mytable设置私有同义词s_sy。( ) A.对 B.错 点击查看答案手机看题 你可能感兴趣的试题 单项选择题 JIT的核心思想是 ()。 A. 彻底消除生产过程中的无效劳动和浪费,使库存量最小,生产费用最低。 B. 对客户需求作出快速反应 C. 重点在于效率与成...
Use the CREATE TABLE statement to create one of the following types of tables:A relational table is the basic structure to hold user data. An object table is a table that uses an object type for a column definition. An object table is explicitly defined to hold object instances of a ...
The base object need not exist at synonym create time. SQL Server checks for the existence of the base object at run time. Synonyms can be created for the following types of objects: Assembly (CLR) stored procedure Assembly (CLR) table-valued function ...
Table1 (User-defined) 1 Includes local and global temporary tables Four-part names for function base objects are not supported. Synonyms can be created, dropped and referenced in dynamic SQL. Permissions To create a synonym in a given schema, a user must have CREATE SYNONYM permission and eith...