GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

SQL - OCR Computer Science A Level

Malachy Moran-Tun Computer Science A level Englisch 10 Karten

Karten in diesem Stapel (10)

  1. 1What is SQL?> Structured Query Language
    > Declaritave language used for updating tables in a relational database
    > Uses statements to make, query, and modify databases
  2. 2What do the Following Commands do? > SELECT > FROM > WHERE > ORDER BY> SELECT - lists the fields to be displayed
    > FROM - lists the table(s) where data will be read from
    > WHERE - lists data that matches the criteria
    > ORDER BY - orders the results (default is ascending order)
  3. 3How does the LIKE Command Work?> Condition that finds values with a wildcard
    > LIKE "a%" finds values that begin with a
    > LIKE "%a" finds values that end with a
    > LIKE "%a%" finds values with a in any position
    > LIKE "_a%" finds values with a in second position (more underscores = higher position)
    > LIKE "a%b" finds values that begin with a and and with b
  4. 4What does the JOIN Command do?> Combines rows from two or more tables, based on a common field between them
  5. 5How does the CREATE TABLE Command Work?CREATE TABLE table_name
    (
    Attribute1 DATA_TYPE, PRIMARY KEY
    Attribute2 DATA_TYPE
    etc.
    )
    For linked tables:
    FOREIGN KEY Attribute3 REFERENCES OtherTable(Attribute3)
  6. 6What Data Types can be used when Creating a Table?> CHAR(n) - string of fixed length n
    > VARCHAR(n) - string of variable length, max n
    > BOOLEAN - true or false, i mean you should know that one
    > INTEGER / INT - ... an integer, what did you expect?
    > FLOAT - a decimal (real) number
    > DATE - a... a date. y'know, day, month year
    > TIME - like hours, minutes, and seconds... it's pretty self explanatory
    > CURRENCY - le cash money
  7. 7How does the ALTER TABLE Command Work?> Used to add, delete, or modify columns
    > ALTER TABLE table_name ADD attribute_name - adds the specified attribute
    > ALTER TABLE table_name DROP COLUMN attribute_name - removes the specified attribute
    > ALTER TABLE table_name MODIFY COLUMN attribute_name DATA_TYPE - changes the data type of the attribute
  8. 8How does the INSERT INTO Command Work?> Used to insert a new record into a table
    INSERT INTO table_name (column1, column2...)
    VALUES (value1, value2...)
    > If attributes are unknown, do not list them in the columns or values
  9. 9How does the UPDATE Command Work?> Used to update a record in a database table
    UPDATE table_name
    SET column1 = value1, etc.
    WHERE attribute = value
  10. 10How does the DELETE Command Work?> it deletes a record. who'd've thunk it?
    DELETE FROM table_name
    WHERE attribute = value

Informationen

Beschreibung
A level Computer Science (Databases and SQL) Karteikarten am SQL - OCR Computer Science A Level, erstellt von Malachy Moran-Tun am 18/05/2022.
Erstellt von
Malachy Moran-Tun
Aufrufe
2
Verlauf
  • Erstellt von Malachy Moran-Tun · 18 Mai 2022
  • Kopiert von Malachy Moran-Tun · 18 Mai 2022
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck