H2 Database Select - H2 Database

What is H2 Database Select?

Select command is used to fetch record data from a table or multiple tables. If we design a select query, then it returns data in the form of result table called result sets.

Syntax

The basic syntax of SELECT statement is as follows –

To fetch all the available fields, use the following syntax.

Example
Consider the CUSTOMER table having the following records –

To get the customer table along with the given data, execute the following queries.

The following command is an example, which would fetch ID, Name and Salary fields of the customers available in the CUSTOMER table.

The above command produces the following result.

Use the following query to fetch all the fields of CUSTOMERS table.

The above query produces the following result –

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

H2 Database Topics