Home Syntax and semantics Variables and data types If- and switch-statements For- and while-loops Functions Programming product' SQL

What is SQL

SQL stands for Structured Query Language
SQL lets you access and manipulate databases

Some of The Most Important SQL Commands

SELECT - extracts data from a database
UPDATE - updates data in a database
DELETE - deletes data from a database
INSERT INTO - inserts new data into a database
CREATE DATABASE - creates a new database
ALTER DATABASE - modifies a database
CREATE TABLE - creates a new table
ALTER TABLE - modifies a table
DROP TABLE - deletes a table
CREATE INDEX - creates an index (search key)
DROP INDEX - deletes an index

Her is an exampel of an ERD

  • Select Medlems-id from Medlemmer;

  • Delete from Medlemmer where Medlems-id="0.1;"

  • Insert into Hold where Hold-id="0.1-0.5;"

  • Update Produkter set Produkt type="bold8" Hold-id= "håndboldU8" where Produkt-id="8.12";
  • In this modul about SQL i worked with Stine and Emil