CREATE PROCEDURE sproc_CreateTableAtRuntime
@TableName NVARCHAR(128)
,@Column1Name NVARCHAR(32)
,@Column1DataType NVARCHAR(32)
,@Column1Nullable NVARCHAR(32)
AS
DECLARE @SQLString NVARCHAR(MAX)
SET @SQString = 'CREATE TABLE ' + @TableName + '( '+ @Column1Name + ' ' + @Column1DataType + ' '+ @Column1Nullable +') ON PRIMARY '
EXEC (@SQLString)
Call this sp and Send the above parameters from c# code
In case if you need more columns add in the store procedure as I have given.
If you believe that column generation will be dynamic then then just send the columns and its data types from Code side.... Please let me know if nay quaries... If you are satisfied
Please mark it as answer