You are dealing with 2 different softwares. You control some database program (HSQL 1.8 in this case) by means of an office suite.
Creating tables, relations and indices Base issues CREATE, ALTER and DROP commands to the database ("data definition language").
While editing table data in grid views and forms, Base issues INSERT, UPDATE, DELETE commands to the database ("data manipulation language").
Base can do most of the DDL and DML for you. I mentioned auto timestamps as one exception where you have to use the SQL command line.
-------------------------------------------------------------
SELECT statements read data from the database, calculate stuff and return row sets back to the office suite where they are displayed in grids, forms, reports, Writer or Calc documents. Queries are somewhat similar to spreadsheet formulas. They reference existing data, process them and return a single value (spreadsheet formula) or a row set (SELECT). SELECT statements are stored in queries mostly. In my example files you may find some SELECT statements in a form's properties dialog.
The basics of SQL are easy to learn (easier than spreadsheet formulas), however things can get highly sophisticated because SQL is more powerful than spreadsheet langauge.
When you double-click a table, Base queries SELECT * FROM "Table" and loads the first screen full of data into a grid view.
The query
Code: Select all
SELECT *, DATEDIFF('day', "date_column", CURRENT_DATE) AS "Days"
FROM "Table"
returns all the rows and columns from "Table" plus a calculated column labeled as "Days" showing the days between "date_column" and the current date.