|
INTERVIEW QUESTIONS
DATABASE
MS SQL SERVER
DETAILS
Question: How To List All Tables in the Database using odbc_tables()?
Answer: If you want to get a list of all tables in the database, you can use the odbc_tables() function, which can actually be used to list all tables and views in the database. The syntax of odbc_tables() is:
$result_set = odbc_tables($connection_object, $qualifier, # database name for SQL Server $owner, # schema name for SQL Server $name, # table or view name for SQL Server $type # valid type names are TABLE and VIEW ) #- The returning result set contains 5 fields: #- TABLE_QUALIFIER, TABLE_OWNER, TABLE_NAME, TABLE_TYPE, #- REMARKS
The owner and name arguments accept search patterns ('%' to match zero or more characters and '_' to match a single character).
The tutorial example below shows you how to get a list of tables in the current database, GlobalGuideLineDatabase, which is hard coded in the DSN definition:
|
|
|
Category |
MS SQL Server Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 8472 users |
Added on |
9/25/2014 |
Views |
67682 |
Rate it! |
|
|
Question:
How To List All Tables in the Database using odbc_tables()?
Answer:
If you want to get a list of all tables in the database, you can use the odbc_tables() function, which can actually be used to list all tables and views in the database. The syntax of odbc_tables() is:
$result_set = odbc_tables($connection_object, $qualifier, # database name for SQL Server $owner, # schema name for SQL Server $name, # table or view name for SQL Server $type # valid type names are TABLE and VIEW ) #- The returning result set contains 5 fields: #- TABLE_QUALIFIER, TABLE_OWNER, TABLE_NAME, TABLE_TYPE, #- REMARKS
The owner and name arguments accept search patterns ('%' to match zero or more characters and '_' to match a single character).
The tutorial example below shows you how to get a list of tables in the current database, GlobalGuideLineDatabase, which is hard coded in the DSN definition: Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
How To Create Prepared Statements using odbc_prepare()?
|
View Answer
|
|
How To Loop through Result Set Objects using odbc_fetch_row()?
|
View Answer
|
|
How To Receive Returning Result from a Query?
|
View Answer
|
|
How To Turn Off Warning Messages during PHP Execution?
|
View Answer
|
|
How To Retrieve Error Messages using odbc_errormsg()?
|
View Answer
|
|
How To Execute a SQL Statement using odbc_exec()?
|
View Answer
|
|
How To List All DSN Entries on Your Local Machine using odbc_data_source()?
|
View Answer
|
|
How To Connect to a SQL Server using odbc_connect()?
|
View Answer
|
|
How To Test ODBC DSN Connection Settings?
|
View Answer
|
|
What Are Commonly Used ODBC Functions in PHP?
|
View Answer
|
|
What Are the Requirements to Use ODBC Connections in PHP Scripts?
|
View Answer
|
|
How Can Windows Applications Connect to SQL Servers via ODBC?
|
View Answer
|
|
How To Connect MS Access to SQL Servers through ODBC?
|
View Answer
|
|
How To Configure and Test ODBC DSN Settings?
|
View Answer
|
|
How To Configure ODBC DSN with Different Port Numbers?
|
View Answer
|
|
How To Verify the Port Number of the SQL Server?
|
View Answer
|
|
How To Enable TCP/IP Protocol on a SQL Server?
|
View Answer
|
|
How To Start SQL Server Browser Service?
|
View Answer
|
|
What Are the Requirements on SQL Server Network Connections?
|
View Answer
|
|
Why Are You Getting Errors When Creating a New ODBC DSN?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All MS SQL Server Interview Questions & Answers - Exam Mode /
Learning Mode
|