![ContractedBlock.gif](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
![ExpandedBlockStart.gif](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
SQL> CREATE TABLE A
2 (A1 INT NOT NULL PRIMARY KEY, --专家博客id
3 A2 VARCHAR2(20)
4 --
![](https://www.cnblogs.com/Images/dot.gif)
![](https://www.cnblogs.com/Images/dot.gif)
5 );
Table created
Executed in 0.031 seconds
SQL> CREATE TABLE B
2 (B1 INT NOT NULL PRIMARY KEY, --专家著作id
3 B2 VARCHAR2(20)
4 --
![](https://www.cnblogs.com/Images/dot.gif)
![](https://www.cnblogs.com/Images/dot.gif)
5 );
Table created
Executed in 0.031 seconds
SQL> CREATE TABLE C
2 (C1 INT NOT NULL PRIMARY KEY, --热门推荐id
3 C2 INT, --专家博客id
4 C3 INT, --专家著作id
5 C4 VARCHAR2(20),
6 --
![](https://www.cnblogs.com/Images/dot.gif)
![](https://www.cnblogs.com/Images/dot.gif)
![](https://www.cnblogs.com/Images/dot.gif)
7 CONSTRAINT FK_A FOREIGN KEY (C2) REFERENCES A(A1),
8 CONSTRAINT FK_B FOREIGN KEY (C3) REFERENCES B(B1)
9 );
Table created
Executed in 0.031 seconds
SQL>