select SchedLine.Length, Details.Type; from SchedLine join detail on SchedLine.SchedLineId = Details.SchedLineIdIf one of the tables doesn't have an equivalent in the other table, the record won't be included in this example. For instance, suppose some data in the Details table doesn't have a valid SchedLineId number; the record will be omitted. To include all records in the Details table, just change JOIN to RIGHT JOIN (meaning, include all records in the table listed on the right side of the JOIN statement):
select SchedLine.Length, Details.Type; from SchedLine right join detail on SchedLine.SchedLineId = Details.SchedLineIdIn the example, if a record in Details doens't have an equivalent in SchedLine, the corresponding fields (here: SchedLine.Length) will be .NULL. in the resulting cursor. If you need a valid value, you would usually use nvl(), something like this:
select nvl(SchedLine.Length, 00000), Details.Type; from SchedLine right join detail on SchedLine.SchedLineId = Details.SchedLineIdThe 5 zeroes are to make sure the field has the correct width (assuming your field is defined as N(5,0)).