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. 完美的js继承

    //完美的js继承 少了类管理器 Object.extend=function(){ var fnTest = /\b_super\b/; //继承父类 var _super = arguments[ ...

  2. 二叉堆(小到大)-数据结构-JavaScript版

    /** * Created by caoke on 2015/11/21. */ //二叉树 特点父节点比子节点小 var Tree2=function(){ //初始化 二叉树的子元素 this.c ...

  3. BankNote

    # coding=utf-8 import pandas as pd import numpy as np from sklearn import cross_validation import te ...

  4. PIE SDK元素的保存与打开

    1.功能简介 绘制元素之后需要对元素进一步的保存操作,可以利用PIE SDK的ExportElementsCommand命令保存成xml格式的文件,打开元素可以利用ImportElementsComm ...

  5. [V1-Team] WEDO创意论坛技术规格说明书

    WEDO 创意论坛技术规格说明书 0x0 文档版本 版本号 说明 v1.0 初步确定技术路线 附Github仓库:WEDO 0x1 技术说明 1. 前端框架   在主流的前端框架中,我们调研了Vue. ...

  6. Android应用捕获全局异常自定义处理

    [2016-06-30]最新的全局异常处理DRCrashHandler已经集成在DR_support_lib库中 具体请看: https://coding.net/u/wrcold520/p/DR_s ...

  7. centos7.3下安装redis3.2 yum安装

    1.进入centos 2.运行:yum install redis 3.安装完成后,选择y,确认 4.进入:cd /etc/;vi redis.conf 将,daemonize 修改为yes,并且添加 ...

  8. 使用Serva通过网络PXE方式安装Windows10/CentOS

    下载Servahttp://www.vercot.com/~serva/download.html也可以从本文附件下载Serva_Community_64_v3.0.0.zip,这是社区版,使用50m ...

  9. jQuery对新添加的控件添加响应事件

    1. 通过id和类控制 <html> <head> <script src="jquery.js"></script> <sc ...

  10. 删除.browserslistrc文件就好了

    $ npm run dev > bootstrap-vue@1.0.0 dev E:\aawork\1work\2019.2\bootstrap-vue> webpack-dev-serv ...