I’m working on an sp that inserts data into two tables. The two tables are featured and featured type, both have a pk featuredid that gets auto incremented each time something is added. I have:
insert into featured
(title,text,imageURL, priority )
values
(@title,@text,@imageURL, @priority),
insert into featuredtype
(loginPage, indexPage, mobilePage)
values
(@loginPage, @indexPage, @mobilePage)
However, it appears this is not the correct method for inserting into two tables from one sp.
You need to get rid of the comma after
@priority),You can replace it with a semi-colon
;or nothing at all, so