SQL(Structured Query Language) - GavinTheCoder/Hello-World GitHub Wiki

Structured Query Language

Structured Query Language(SQL) is a database management system, 

that creates a table, you can also insert data to it, to make a list, like a grocery list. It was born in 1970s, at that time, it was called SEQUEL then (Structured English Query Language). I can’t do a “hello world” example, but I’m going to use a list to show you.

[———-----------------------------------------------------------------------------------] [ CREATE TABLE groceries (id INTEGER PRIMARY KEY, name TEXT, quantity INTEGER ); ] [ ] [ INSERT INTO groceries VALUES (1, "Bananas", 4); ] [ INSERT INTO groceries VALUES (2, "Peanut Butter", 1); ] [ INSERT INTO groceries VALUES (3, "Dark chocolate bars", 2); ] [———-----------------------------------------------------------------------------------]

This is an example of a groceries list: First create a table named groceries that has: an ID (which is a integer and it’s a primary key) a name(which is a text) and a quantity(which is another integer)

CREATE TABLE groceries (id INTEGER PRIMARY KEY, name TEXT, quantity INTEGER );

And this will appear:

Picture of groceries list:

And add in to the list: bananas: INSERT INTO groceries VALUES (1, "Bananas", 4);

Picture:

peanut butter:

INSERT INTO groceries VALUES (2, "Peanut Butter", 1);

Picture:

Dark chocolate bars:

INSERT INTO groceries VALUES (3, "Dark chocolate bars", 2);

Picture:

Now: Click at the name of list or type: Select * FROM groceries; The * means ALL (things)

My experience is: it’s very good for list, but that’s it, it also can’t be connected with Java or HTML or other programing languages, even dough, I think it’s still very indeed good!