create table employee
(
em_id int not null primary key,
em_name varchar(20) not null,
salary money not null
)
Go
create function salary(@id int)
returns table as
return(select * from employee where em_id = @id)
Go
select temp1.dbo.salary(1)显示对象名无效
(
em_id int not null primary key,
em_name varchar(20) not null,
salary money not null
)
Go
create function salary(@id int)
returns table as
return(select * from employee where em_id = @id)
Go
select temp1.dbo.salary(1)显示对象名无效
create function f_stock(@bom_head varchar(20))
returns @t table(bom varchar(20),number int)
as
Go
select temp1.dbo.salary(1)
===================================
改為select * from temp1.dbo.salary(1) T
直接select table,當然報錯