How to reference two table when lack reference column.
Question:How to reference two table when lack reference column.
Example:
1.Create two tables the one of lack reference column.
CREATE TABLE t1(
t_id NUMBER,
t_age NUMBER
);
INSERT INTO t1 VALUES(1,24);
COMMIT;
CREATE TABLE t2(
t_name VARCHAR2(20)
);
INSERT INTO t2 VALUES('sbn');
COMMIT;
2.add a column become a reference conditon.
ALTER TABLE t2 ADD t_id NUMBER;
INSERT INTO t2 (t_id) VALUES(1);
SELECT * FROM t2; SELECT a.t_id,a.t_age,b.t_name
FROM t1 a,t2 b
WHERE a.t_id=b.t_id;
How to reference two table when lack reference column.的更多相关文章
- 错误代码: 1247 Reference 'startTime' not supported (forward reference in item list)
1.错误描述 1 queries executed, 0 success, 1 errors, 0 warnings 查询:SELECT a.createUserId AS typeId, (SELE ...
- error: cannot lock ref 'refs/remotes/origin/master': unable to resolve reference 'refs/remotes/origin/master': reference broken...
之前在自己的项目中添加了一个分支,然后做了一些操作,比如同步本地的分支情况到远程仓库中,然后在远程仓库中完成分支合并,以及 Pull request 等等操作,后来,在本地仓库中进行 git fetc ...
- Cannot create __weak reference in file using manual reference counting
Xcode更新到7.3后会出现NSObject+MJProperty.h报Cannot create __weak reference in file using manual reference c ...
- ubuntu下调试ffmpeg程序出现undefined reference to pthread_once ,undefined reference to uncompress错误
Ubuntu(版本16.04)下默认配置编译Ffmpeg(版本4.1.3configure 添加选项--enable-threads),将编译好的ffmpeg库添加到程序 中进行编译出现undefin ...
- Linux Ubuntu运行线程程序出现undefined reference to ‘pthread_create’和undefined reference to ‘pthread_join’错误。
Linux Ubuntu运行线程程序出现undefined reference to ‘pthread_create’和undefined reference to ‘pthread_join’错误. ...
- alter table fx.pet modify column `species` varchar(20) binary;
alter table fx.pet modify column `species` varchar(20) binary;
- Xcode 7.3 cannot create __weak reference in file using manual reference counting
原帖地址 http://stackoverflow.com/questions/36147625/xcode-7-3-cannot-create-weak-reference-in-file-us ...
- 安装sphinx报错(undefined reference to `libiconv_open' 、undefined reference to `libiconv'、undefined reference to `libiconv_close'、make[1]: *** No rule to make target `all'. Stop. 、make: *** [all-recursive
(为知笔记copy过来格式有变,希望对遇到此问题的童鞋有帮助) 具体错误: Thank you for choosing Sphinx! [root@vm-vagrant csft-4.1]# mak ...
- iOS之报错“Cannot create __weak reference in file using manual reference counting”解决办法
解决的办法:在Build Settings--------->Aplle LLVM8.0 - Language - Objectibe-C------------->Weak Refere ...
随机推荐
- POJ1064 Cable master 【二分找最大值】
题目:题目太长了! https://vjudge.net/problem/POJ-1064 题意分析:给了你N根长度为小数形式的棍子,再给出了你需要分的棍子的数量K,但要求你这K根棍子的长度必须是一样 ...
- P2387 [NOI2014]魔法森林
传送门 如果一条边只要考虑 $a$ 的限制,那么显然最小生成树 但是现在有 $a,b$ 两个限制,所以考虑按 $a$ 从小到大枚举边,动态维护 $b$ 的最小生成树 考虑新加入的一条边 $x,y$ , ...
- KD树的极简单笔记(待后续更新)
今天(18.5.4)室友A突然问我算法怎么入门,兴奋之下给他安利了邓公的<数据结构>,然而他接着又问我能不能两周内快速入门,毕竟打算搞Machine Learning,然后掏出手机看了下他 ...
- js请求数据的例子
//es6实现方式 const getData = async ()=> { //同步请求数据 const res1=await this.$http.get("https://www ...
- 认识CSS中css的三大特性:层叠性、继承性以及优先级
前端之HTML.CSS(四) CSS CSS三大特性 层叠性:多种样式的叠加,一个属性通过两个选择器设置在同一个元素上,后一个样式会把前一个样式层叠(覆盖).层叠性的两种情况:第一种样式冲突时,后样式 ...
- poj3176
一.题意:给定一些数,成三角形排列.从上往下走,每个数只能往它相邻的两个数走,一直走到底端得到一条线路.这条线路上的数的和最大是多少 二.思路:简单的动态规划.dp[i+1][j+1]:=以第i+1行 ...
- UnityError The same field name is serialized multiple times in the class or its parent class. This is not supported: Base(MonoBehaviour) i
相同的字段名在类或其父类中被多次序列化.这是不支持的, 这里指的是 变量i . 写如下两个脚本挂到新项目的相机上运行就会出现这个问题: public class Father : MonoBehavi ...
- vue生命周期及使用 && 单文件组件下的生命周期
生命周期钩子 这篇文章主要记录与生命周期相关的问题. 之前,我们讲到过生命周期,如下所示: 根据图示我们很容易理解vue的生命周期: js执行到new Vue() 后,即进入vue的beforeCre ...
- DBNull.Value.ToString() == string.Empty
Console.WriteLine(DBNull.Value.ToString() == string.Empty); //True
- TOJ 3660 家庭关系
描述 给定若干家庭成员之间的关系,判断2个人是否属于同一家庭,即2个人之间均可以通过这些关系直接或者间接联系. 输入 输入数据有多组,每组数据的第一行为一个正整数n(1<=n<=100), ...