This worked for me.
ALTER procedure [dbo].[insertpropertylisting]
@propertyname varchar(150),
@propertyaddress varchar(250),
@propertyprice money,
@availableunits varchar(100),
@propertyid int OUTPUT
as
BEGIN
insert into propertylisting (
propertyname,
propertyaddress,
propertyprice,
availableunits)
OUTPUT
inserted.propertyname,
inserted.propertyaddress,
inserted.propertyprice,
inserted.availableunits,
inserted.property_id
values(
@propertyname,
@propertyaddress,
@propertyprice,
@availableunits)
END
Create table #propertylisting
(
propertyname varchar(150),
propertyaddress varchar(250),
propertyprice money,
availableunits varchar(100),
propertyid int
)
Insert into #propertylisting (
propertyname,
propertyaddress,
propertyprice,
availableunits,
propertyid)
Exec [dbo].[insertpropertylisting]
Drop table #propertylisting