Results 1 to 5 of 5
Thread: procedure add data in MS SQL
Apr 27, 2012, 01:44 #1
procedure add data in MS SQL
can someone assist what am I doing wrong!..
I have two tables shop and shop_owner I want to have a procedure which will be adding shops to the mall(if owner open a new shop)
CREATE PROCEDURE update_mall AS BEGIN declare @man varchar(30); select * from shop_owner where owner_Id = 'MAN001' //assuming MAN001 is the ID admin enter in search box set @man = 'MAN001' if(@man= 'MAN001') begin insert into shop (owner_Id,shop_name,shop_location) values ('MAN001','Shine and smile','Kariakoo'); end END