Question:How to reference two table when lack reference column.

Example:

1.Create two tables the one of  lack reference column.

  1. CREATE TABLE t1(
  2. t_id NUMBER,
  3. t_age NUMBER
  4. );
    INSERT INTO t1 VALUES(1,24);
    COMMIT;
  1. CREATE TABLE t2(
  2. t_name VARCHAR2(20)
  3. );
  4. INSERT INTO t2 VALUES('sbn');
  5. COMMIT;

 2.add a column become a reference conditon.

  1. ALTER TABLE t2 ADD t_id NUMBER;
  2. INSERT INTO t2 (t_id) VALUES(1);
  3. SELECT * FROM t2;
  4.  
  5. SELECT a.t_id,a.t_age,b.t_name
  6. FROM t1 a,t2 b
  7. 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. hdu6325 Interstellar Travel 凸包变形

    题目传送门 题目大意: 给出n个平面坐标,保证第一个点和第n个点y值为0,其余点的x坐标都在中间,要从 i 点走到 j 点的要求是 i 点的横坐标严格小于 j 的横坐标,并且消耗的能量是(xi * y ...

  2. UESTC - 1607 ad-hoc

    #include<bits/stdc++.h> #define rep(i,j,k) for(register int i=j;i<=k;i++) using namespace s ...

  3. C#工具类之素数扩展类

    /// <summary> /// 素数帮忙类 /// 本类是从.net源码 类 internal static class HashHelpers 类里抽取相应的代码 /// https ...

  4. 事件获取目标 currentTarget target srcElement 三者之间的区别和联系

    currentTarget   指的是触发事件的当前对象,可以是冒泡和捕获的对象,不一定是点击或者鼠标移入等事件的直接触发对象.可以是他的父元素等. target 指的是事件触发的直接对象.IE有兼容 ...

  5. js去掉浏览器右键点击默认事件(+vue项目开启右键行为)

    js去掉浏览器右键点击默认事件 1.阻止整个页面所有的右击事件 document.oncontextmenu = function(){ return false;} 2.特定的区域/元素 docum ...

  6. npm install 卡住的时候的处理

    [From] http://www.eguidedog.net/doc/what-to-do-when-npm-install-hangs.php 翻译一下,npm install 经常卡在下载某个包 ...

  7. linux中终端字体样式显示不正常

    问题:Centos终端中,字体显示不正常,中间感觉有空格,空格和单词傻傻分不清. 解决办法: yum groupinstall "Chinese Support" yum grou ...

  8. pandas 多列排序

    import pandas as pd df = pd.DataFrame({'AAA' : [1,2,1,3], 'BBB' : [1,1,2,2], 'CCC' : [2,1,3,1]}) sou ...

  9. 初探angular

    前言 angular4.0目前已经发布了,angular是mvw框架,所以对其有一个简单的了解还是很有必要的. 目前angular有中文官网,且文档介绍也都是4.x的,但是为了了解其发展过程,我们先了 ...

  10. 【ExtJS】关于自定义组件

    一.命名规范 在你编码过程中对类,名字空间以及文件名使用统一的命名规则对你代码的组织,结构化以及可读性有很大的好处. 1.类命名规范: 类名最好只包含字母,在多数情况下,数字是不鼓励使用的,除非非要用 ...