0

Employee桌子

员工

Designation桌子

指定

我想在指定表的结果集中显示指定。我正在使用 nic 搜索数据。

帮我

谢谢

4

4 回答 4

1
select e.serial_no, d.designation, e.name, e.epf_no, e.appointment_date, e.nic, e.dob 
from employee e, designation d 
where e.designation = d.number and e.nic = 'the_number_you_want'
于 2013-08-31T06:44:01.833 回答
0

例如,如果我们必须为893041699 nic number

select d.designation from designation d
  join employee e on d.number = e.serial_no
  where e.nic=893041699; //example for nic number 893041699

显示输出如

designation
------------
Helper
于 2013-08-31T06:43:53.113 回答
0
Select * from employee a, designation b where a.serial_no = b.number and a.nic=921560419
于 2013-08-31T06:44:05.520 回答
0

试试这个:

select e.*, d.designation AS desi_name FROM employee AS e LEFT JOIN designation AS d ON e.serial_no=d.number

你进去desi_name

于 2013-08-31T06:44:34.390 回答