I need to pass a DataTable to a stored procedure in MS SQL 2008 to insert multiple rows into a table at the same time. I came across methods that use XML documents to do this and even to pass lists as image data.
What is the best way to do this?
If necessary, provide sample code and / or links.
See Table Parameters and SQL Server 2008: Table Parameters
- - , temp .
, , :
CREATE PROC DoStuff AS BEGIN CREATE TABLE #tobeinserted (Data1 INT, Data2 INT...) EXEC InsertRows END CREATE PROC InsertRows AS BEGIN INSERT INTO Table1 SELECT * FROM #tobeinserted END
, , , . , , , () , . , SP.
Source: https://habr.com/ru/post/1777034/More articles:Cannot connect to "local" (SQL Server 2008) - databaseC ++ virtual table error? - virtualNesting collections of custom configuration items - asp.netQuickly convert TIFF images for display in web client - c #Передача дескриптора в консольное приложение или управляемая/неуправляемая справка - c#Maven build: ear with extra resources in zip code - mavenHow to use namespaces in WCF contracts? - wcfCriterion of sleep mode Case-insensitive question - javaScalability - performancehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1777039/passing-arguments-to-jquery&usg=ALkJrhgJU5PRLFdXtHWHXmiyBYee1mVZKAAll Articles