Skip to content

Latest commit

 

History

History
62 lines (42 loc) · 1.59 KB

firebirdsql.md

File metadata and controls

62 lines (42 loc) · 1.59 KB

FirebirdSQL cheatsheet for version 4.0

FirebirdSQL is a relational database management system that supports SQL and is known for its high performance and stability. It can run on multiple operating systems, including Windows, Linux, and macOS.

Connecting to FirebirdSQL

To connect to a FirebirdSQL database, you can use the isql command-line tool or a variety of client libraries that are available in multiple programming languages.

Creating a table

The following SQL statement creates a table named people with columns for id, name, age, and email.

CREATE TABLE people (
  id INTEGER NOT NULL PRIMARY KEY,
  name VARCHAR(100),
  age INTEGER,
  email VARCHAR(100)
);

Inserting data

The following SQL statement inserts a new row into the people table.

INSERT INTO people (id, name, age, email)
VALUES (1, 'John Doe', 30, '[email protected]');

Updating data

The following SQL statement updates the age of a person with the id of 1.

UPDATE people
SET age = 31
WHERE id = 1;

Deleting data

The following SQL statement deletes a person with the id of 1.

DELETE FROM people
WHERE id = 1;

Querying data

The following SQL statement retrieves all rows from the people table.

SELECT * FROM people;

Additional Resources