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;