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.的更多相关文章

  1. 错误代码: 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 ...

  2. error: cannot lock ref 'refs/remotes/origin/master': unable to resolve reference 'refs/remotes/origin/master': reference broken...

    之前在自己的项目中添加了一个分支,然后做了一些操作,比如同步本地的分支情况到远程仓库中,然后在远程仓库中完成分支合并,以及 Pull request 等等操作,后来,在本地仓库中进行 git fetc ...

  3. 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 ...

  4. ubuntu下调试ffmpeg程序出现undefined reference to pthread_once ,undefined reference to uncompress错误

    Ubuntu(版本16.04)下默认配置编译Ffmpeg(版本4.1.3configure 添加选项--enable-threads),将编译好的ffmpeg库添加到程序 中进行编译出现undefin ...

  5. Linux Ubuntu运行线程程序出现undefined reference to ‘pthread_create’和undefined reference to ‘pthread_join’错误。

    Linux Ubuntu运行线程程序出现undefined reference to ‘pthread_create’和undefined reference to ‘pthread_join’错误. ...

  6. alter table fx.pet modify column `species` varchar(20) binary;

    alter table fx.pet modify column `species` varchar(20) binary;

  7. 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 ...

  8. 安装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 ...

  9. iOS之报错“Cannot create __weak reference in file using manual reference counting”解决办法

    解决的办法:在Build Settings--------->Aplle LLVM8.0 - Language - Objectibe-C------------->Weak Refere ...

随机推荐

  1. python-sort()/sorted()比较

    Sorting Lists sorted(iterable,key=None,reverse=False),does not mutate list, must assign result to a ...

  2. PHP报错

    php.ini ; 错误日志 log_errors = On ; 显示错误 display_errors = Off ; 日志路径 error_log = "/usr/local/lnmp/ ...

  3. session.flush()与session.clear()的区别及使用环境

    [From] http://blog.csdn.net/leidengyan/article/details/7514484 首先session是有一级缓存的,目的是为了减少查询数据库的时间,提高效率 ...

  4. android AIDL服务

    这篇文章http://byandby.iteye.com/blog/1026110我们介绍了android的本地服务:它只能由承载它的应用程序使用.现在我们将介绍如何构建可由其他进程通过 RPC 使用 ...

  5. tomcat-dbcp数据库连接池配置以及使用时候的一些坑

    一.数据库连接池 开发的时候经常会需要对数据库进行一些操作,比如说常见的增删改查之类的,当数据量小的时候,可以直接进行操作,但是当数据量增多的时候,每一次连接以及释放数据库都会耗费一定的时间,这个时候 ...

  6. Table 边框合并(collapse)

    border-collapse:collapse 用于表格属性, 表示表格的两边框合并为一条; <style type="text/css"> table { bord ...

  7. winfrom 树勾选

    树勾选 /// <summary> /// 树勾选 /// </summary> /// <param name="sender"></p ...

  8. Java网络编程三--基于TCP协议的网络编程

    ServerSocket对象用于监听来自客户端的Socket连接,如果没有连接,它将一直处于等待状体 Socket accept():如果接收到客户端的连接请求,该方法返回一个与客户端对应Socket ...

  9. 弹性布局学习-详解flex-wrap(五)

    目录 弹性布局学习-介绍(一)  弹性布局学习-详解 flex-direction[决定主轴的方向](二) 弹性布局学习-详解 justify-content(三) 弹性布局学习-详解 align-i ...

  10. 2017年10月9日 冒泡&去重复习

    今天看了一下,就是数组跟js还是不太熟悉 冒泡排序    var arr = [4, 2, 1, 3, 6, 5];        for(var i = 1; i < arr.length; ...