my query is
String query = @"SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE';";
this will return all the table names of database in combobox.
but i want fix number of tables in combobox which changes is require in this query?
please help
thank you..
Loading
asmita patilPosted Feb 3, 2015, 4:11 AM
its done now....
Saber ShaikhPosted Feb 3, 2015, 2:39 AM
Hi Asmita,
(Joginder Banger) Right
String query = @"SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE like '%' +'BASE TABLE' +'%'
it is Right
Joginder BangerPosted Feb 3, 2015, 1:38 AM
Asmita Patil,
Like means works similar. For example
String query = @"SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE like '%' +'BASE TABLE' +'%' . This query return multiple records.
Note:- if you want data only start Base table name just change something in query like
Table_type like 'Base table +'%'
Or if you want data end with base table change something like this Table_type '%'+'base table'
asmita patilPosted Feb 3, 2015, 1:23 AM
thank you for your reply..
your suggestion will be work but one problem is there...
in LIKE operator multiple tables name can not be allow
so how to write multiple tables name in LIKE operator..
please help..
VulpesPosted Jan 31, 2015, 2:20 PM
Which tables in particular do you want the query to return? If they have a similar name you might be able to use a LIKE operator in the WHERE clause.
asmita patilPosted Jan 31, 2015, 5:47 AM
thank you for your reply,
can u please explain count(*) means?
i want perticular tables in combo box where and how to specify that table name in query.
Riddhi ValechaPosted Jan 31, 2015, 5:38 AM
SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
This will give total number of tables.