JDBC – More About Columns in an SQL Query

Learn how to get details of columns in an SQL query with JDBC.

1. Introduction

An earlier article covered the basics of JDBC (Java DataBase Connectivity) and how to perform SQL queries on a MySQL database. Frequently, it is useful to obtain more information about the columns in a query. These include: the number of columns, column names and types, etc. Maybe you want to build a GUI table showing the results of a query, which requires the names of the columns and more. This article will show you how to retrive the information using JDBC.

Continue reading “JDBC – More About Columns in an SQL Query”

JDBC MySQL Tutorial

A simple tutorial showing the basics of using JDBC database API.

“A man’s true character comes out when he’s drunk.”
― Charlie Chaplin

1. Introduction

JDBC stands for Java DataBase Connectivity and is the standard API (application programming interface) java provides for working with databases. JDBC, as a standard, is built into the java platform. To connect with and use a database, you need an additional component called a jdbc driver, which is specific to the type of database you are working with, such as MySQL, SQL Server, etc. In other words, the JDBC API consists of a small number of classes and a bunch of interfaces, the implementation provided by the actual database vendor. This is illustrated by the figure below.

Continue reading “JDBC MySQL Tutorial”