
Untitled
By: a guest on
May 12th, 2012 | syntax:
None | size: 0.46 KB | hits: 14 | expires: Never
How to match two tables with different primary key lengths
SELECT domainregion.domainid, dyndomrun.ddid
FROM domainregion, dyndomrun
WHERE domainregion.domainid = dyndomrun.ddid
ORDER BY domainregion.domainid, dyndomrun.ddid;
select *
from t1
, t2
where to_char(t1.id) = substr(t2.id,1,4)
select *
from t1
, t2
where t1.id = round(t2.id/10)
SELECT *
FROM person
INNER JOIN department ON person.personid = LEFT(department.personid,4)