Skip to content

SQL Mini Tutorial

Garve Hays edited this page Nov 15, 2019 · 2 revisions

Here we provide a brief tutorial for Structured Query Language or SQL. We will discuss four basic operations: query, insert, update, and delete. These operations are performed on a table which consists of rows and columns.

Query

Think of query as a read that will list all or some subset of rows in the table. You may use the wildcard '*' to indicate all columns.

SELECT * FROM accesspoint;

You may also reduce the number of columns returned by the query by specifying which ones should be included.

SELECT id, essid, vendor FROM accesspoint;

Insert

Values are added to the table using the insert statement.

INSERT INTO acesspoint (essid, bssid, vendor, channel)
VALUES ('HoneyPot2', 'c4:6e:1f:0c:82:03', 'TP-LINK TECHNOLOGIES CO. LTD.', 4);

Update

You may change column information using the update statement.

UPDATE accesspoint SET essid = 'Jumbo' WHERE id = 3;

Delete

Rows are removed from the table via the delete statement.

DELET FROM accesspoint WHERE vendor = 'Sagemcom Broadband SAS';
Clone this wiki locally