如何从Tables Columns中获取数据,哪些列的名称存储在数组中 [英] How to fetch data from Tables Columns, Which columns' name are store in array
本文介绍了如何从Tables Columns中获取数据,哪些列的名称存储在数组中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有人,
我有一个问题,希望有人能为我提供解决方案。
我有一些列名称表将填充字符串数组。
例如fields(0)=Fields_A
fields(1)=Fields_B
fields(2)=Fields_C
但实际上,我想在运行时获取Fields_A,Fields_B和Fields_C的内容。
我该怎么办? ?
Dear All,
I have a problem, wishing anyone can provide a solution to me.
I have some columns name of table will be filled in string array.
e.g. fields(0) = "Fields_A"
fields(1) = "Fields_B"
fields(2) = "Fields_C"
But actually, I want to fetch the content of "Fields_A", "Fields_B" & "Fields_C" in runtime.
How can I do ?
推荐答案
您好,
以下链接可以帮助您。
如何为单个存储过程生成动态where条件 [ ^ ]
这是类似问题的解决方案,而那里是Where Condition,在你的情况下是它的Column Name,但两者都可以使用Dynamic Sql查询
。
希望它有所帮助。
Hi,
The below link may help you.
How to generate dynamic where condition for a single stored procedure[^]
that was the solution given for similar question, whereas there it was "Where Condition", in your case its "Column Name", but both can useDynamic Sql queries
.
hope it helps.
这篇关于如何从Tables Columns中获取数据,哪些列的名称存储在数组中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文