How Do You Get a List of SQL's Keywords? JDBC

Each database has a finite set of SQL keywords. JDBC enables you to get a list of
these keywords for a specific database. You can use
DatabaseMetaData.getSQLKeywords() to retrieve a set of SQL keywords. Next I present a Java servlet (GetSQLKeywords), which will be able to get a list of SQL keywords as HTML or XML. Here is the signature of the servlet:


You may add other parameters to suit your database application. Here, I use vendor to act as a database selector. So, to get the table information as XML for a MySQL database, you may invoke it as

The Solution

Invoking GetSQLKeywords for MySQL

Figure : shows how to run the solution for the MySQL database.

Invoking GetSQLKeywords for MySQL

Invoking GetTablesAndViews for Oracle

Figure : shows how to run the solution for the Oracle database.

Invoking GetTablesAndViews for Oracle

Face Book Twitter Google Plus Instagram Youtube Linkedin Myspace Pinterest Soundcloud Wikipedia

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

JDBC Topics