Karteikarten
SQL Flashcards

Karten in diesem Stapel (8)
- 1What does SQL stand for?Structured Query Language (SQL)
- 2What are the uses of a SQL?The uses are that it can be used to create, update, and query (search) databases. It consists of standard commands called statements.
- 3The different data types whcih are often used in a SQL.

- 4How SQL works?The first thing that every database needs is a table. The SQL statement CREATE TABLE creates a database table.
- 5For each field in the table, you need to speicfy a data type. Some common SQL data types are shown behind.

- 6CREATE TABLE students (studentID INTEGER PRIMARY KEY, forename TEXT, surname TEXT, date_of_birth DATE, year_group INTEGER)This code creates a table with five fields: studentID, forename, surname, date_of_birth and year_group. It gives the data type of each field and makes studentID the primary key
- 7Once you've created an empty table you'll need to add records to it. You use INSERT INFO command. If you are inserting a complete record you don't need to speicfy the field but if it is incomplete you do.INSERT INFO students VALUES (01, Uwais, Edris, 10 December 2001, 11)
- 8To update a reocrd you can use UPDATE-SET-WHERE.UPDATE students SET date_of_birth = 30 December 2001 WHERE studentID = 01