R
R
repeat2019-06-24 22:39:10
SQL Server
repeat, 2019-06-24 22:39:10

How to build a dynamic query where the string @column_name1 = column_value1 will turn out, etc.?

How to build a dynamic query where the string @column_name1 = column_value1, @column_name2 = column_value2, etc. will be obtained.
For example, given a table
create table test1(
id int
,val varchar(30)
);
insert into test1 values(5,'qwe');
expectation:
string like , @id=5, @val='qwe'

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question