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 ...
随机推荐
- Linux 安装 Djiango
yum 安装方法 以下安装位于 Centos Linux 环境下安装,如果是你的 Linux 系统是 ubuntu 请使用 apt-get 命令. 默认情况下 Linux 环境已经支持了Python. ...
- python-%操作符
1.打印字符串 print("His name is %s"%("Aviad")) His name is Aviad 2.打印整数print("He ...
- Codeforces Round #462 (Div. 2), problem: (C) A Twisty Movement (求可以转一次区间的不递增子序列元素只有1,2)
题目意思: 给长度为n(n<=2000)的数字串,数字只能为1或者2,可以将其中一段区间[l,r]翻转,求翻转后的最长非递减子序列长度. 题解:求出1的前缀和,2的后缀和,以及区间[i,j]的最 ...
- Wamp环境域名重定向问题
打开浏览器输入地址跳转不到页面,还得再次输入www后的内容, 解决办法: D:\wamp\bin\apache\apache2.4.9\conf(这里安装在D盘所以是D) 目录中文件:httpd.co ...
- 全排列 next_permutation() 函数的使用
看来看去还是这篇博客比较简洁明了 https://www.cnblogs.com/My-Sunshine/p/4985366.html 顺便给出牛客网的一道题,虽然这道题用dfs写出全排列也能做,题意 ...
- poj2718
一.题意:给定一串数字,数字没有重复,个数为2~10个.求这些数字分为两份,组合成的两个数的差最小是多少 二.思路:首先可以肯定的是,将这n个数平均分成两份,所得到的最小差一定在其某个组合当中.因此可 ...
- PHP CURL_ERRNO 77
项目中碰到curl https偶尔出现false,错误码77,可以尝试下面两种解决方法: 1.确认安装机器ca-certificates,重启PHP.设置curl_setopt($ch, CURLOP ...
- spring对异步的支持
spring中异步方法的配置 1.在web.xml文件中设置org.springframework.web.servlet.DispatcherServlet的async-supported属性为tr ...
- 重新分析connection reset by peer, socket write error错误原因
上次写<connection reset by peer, socket write error问题排查>已经过去大半年,当时把问题"敷衍"过去了. 但是此后每隔一段时 ...
- hadoop面试题一
1.hadoop运行的原理?xxxxxx 2.mapreduce的原理?xxxxxx 3.HDFS存储的机制?xxxxxx 4.举一个简单的例子说明mapreduce是怎么来运行的 ?xxxxxx 5 ...