Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #329

Merged
merged 1 commit into from
Oct 21, 2024
Merged

fix #329

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
# **CREATE...FROM...PUBLICATION...**
# **CREATE PUBLICATION**

## **语法说明**

`CREATE...FROM...PUBLICATION...` 是订阅方订阅一个由发布方创建的发布,用来获取发布方的共享数据
`CREATE PUBLICATION` 将一个新的发布添加到当前数据库中

## **语法结构**

```
CREATE DATABASE database_name
FROM account_name
PUBLICATION pubname;
CREATE PUBLICATION pubname
DATABASE database_name ACCOUNT
[ { ALL
| account_name, [, ... ] }]
[ COMMENT 'string']
```

## 语法解释

- database_name:订阅方创建的数据库名称
- pubname:发布方已发布的发布名称
- account_name:可获取该发布的实例名称
- pubname:发布名称。发布名称必须与当前数据库中任何现有发布的名称不同
- database_name:当前租户下已存在的某个数据库名称
- account_name:可获取该发布的租户名称

## **示例**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ PUBLICATION pubname;
## **示例**

```sql


-- 假设会话 1 为发布方,由发布方先发布一个数据库给另外一个接受方
create database sys_db_1;
use sys_db_1;
Expand Down