السلام عليكم
ALTER PROCEDURE dbo.StoredProcedure7
(
@par1 int
)
AS
select * from emps
inner join orders
on emps.emp_id=orders.emp_id
where emp_id=@par1
RETURN
///////////////
first table emps(emp_id ,name)emp_id is primary key
second table orders(orde_id,emp_id,prodct)
///////////////
when it run, the followin erroe message come
ambiguous column name'emp_id'
but when i pass parameter (par1) to any other column
even if it is a primary key it run correctly
شكرا جزيلا


