What is SQL?
SQL (pronounced "ess-que-el") stands for Structured Query Language.
SQL is used to communicate with a database. SQL statements are used to perform tasks such as update data on a database, or retrieve data from a database. Some common relational database management systems that use SQL are: Oracle, Sybase, MariaDB, MySQL, Microsoft SQL Server, Access, Ingres, etc. Although most database systems use SQL, most of them also have their own additional proprietary extensions that are usually only used on their system.
A relational database (SQL) system contains one or more objects called tables. The data or information for the database are stored in these tables. Tables are uniquely identified by their names and are comprised of columns and rows. Columns contain the column name, data type, and any other attributes for the column. Rows contain the records or data for the columns.
The select statement is used to query the database and retrieve selected data that match the criteria that you specify.
Here is the format of a simple select statement:
SELECT column1,column2,column3 FROM TableName [where condition] [order by column1]
-or-
SELECT Number, Firstname, Lastname FROM FOLIOHD WHERE RoomNumber <> '*OUT' ORDER BY roomnumber
This displays the Folio Number, First name and Last name from the FOLIOHD file, excluded checked out guests, in order by room number.
InnQuest Software does not provide support for writing and creating SQL Queries, but just support in using the facility to create them. There are many sources to learn about SQL. Two options are listed below.
- Book: SQL for Dummies 3rd Edition - Allen G. Taylor.
- Online: www.w3schools.com/sql