create proc InsertTagsForArticle(@ArticleID int, @TagIDsList nvarchar(max))
as
--...........
The parameter @TagsList contains IDs of tags separated by comma: "18,22, 23".
How to insert these IDs into table by more rational way?
EDIT: The question is how to insert an array into sql server table, but not how to parse an array. It’s something like foreach operator.
As SQL server doesn’t support native arrays, there’s not much that you can do.
Your requirements will dictate what’s better for you. But usually normalized approach is working better.