How to get the column count and column name from the

resultset in the database connection program?

Answers were Sorted based on User's Feedback



How to get the column count and column name from the resultset in the database connection program..

Answer / punit

in ur mysql database there is 1 database with name
information_schema,
so 1st type,
use information_schema;
inthis data base there is 1 table COLUMNS which contain all
the info related to allthe tables in ur mysql,

so hit the following queri for youe column count:-
select count(*) from COLUMNS where TABLE_NAME='Table name';

Is This Answer Correct ?    0 Yes 1 No

How to get the column count and column name from the resultset in the database connection program..

Answer / sreeprasad

you use following sql query

select column name, count(column name)from table name.

Is This Answer Correct ?    4 Yes 6 No

How to get the column count and column name from the resultset in the database connection program..

Answer / uday kumar_anem

Hello friends, just observe the question.

It is not Datatable, it is database connection program.

Say i user "select * from table"

Here i dont know how many col r there in my table.

So give the answer to find the number of columns in that
table.

Is This Answer Correct ?    0 Yes 2 No

How to get the column count and column name from the resultset in the database connection program..

Answer / sreeprasad

Thanq Akshara..

Is This Answer Correct ?    0 Yes 3 No

How to get the column count and column name from the resultset in the database connection program..

Answer / akshara

in the vb script we use genralluy to count the rows as
rowcount=datatabble.GetSheet("Sheet name").GetRowCount
MsgBox(rowcount)
i fyou need sheet count
datatable.getcheetcount
Thank you

Is This Answer Correct ?    0 Yes 5 No

How to get the column count and column name from the resultset in the database connection program..

Answer / prasad

Select column_name, count(column_name) from user_tab_columns
where table_name='EMP' group by rollup(column_name);

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More QTP Interview Questions

What is Object Spy in QTP?

1 Answers   Crea,


I want to open a Google page without recording a test and i do not want to use system.Util.run command as well how do i do this?

11 Answers   IBM,


Hi friends I am new in Qtp. now i am Searching on Qtp give real time inter questions with answers.pls help me

1 Answers  


Define object spy ?

0 Answers  


How to count the no of objects in XML file(QTP)

1 Answers   IBM,






can any one tell me the script to click on a button in the wintoolbar.

1 Answers  


How to record right click of a context menu and click on the selection ?

3 Answers  


pls help me with scripting,right from the beginning in QTP

1 Answers  


What is the parameterization?

0 Answers  


How can we count the no of rows are available in a data table ?

9 Answers   Kanbay,


hi how could i get installation guide for QTP 9.0 on XP help me for this !!!!!

1 Answers  


How do you handle multiple banners(at the top the page, the banner is scrolling) in a web page(Dont take the name property(regular expression))

0 Answers   CFC, iton,


Categories