SQL Tutorial Flashcards
Source: http://www.w3schools.com/sql/default.asp (121 cards)
What is SQL?
A standard language for accessing databases. It stands for Structured Query Language. It is an ANSI standard however there are different versions of the language.
What is ANSI?
American National Standards Institute
What things do you need to build a website that shows data from a database?
- An RDBMS database program
- To use a server-side scripting language like PHP or ASP
- To use SQL to get the data you want
- To use HTML/CSS
What is RDBMS?
Relational Database Management System.
Is SQL case sensitive?
No. SELECT is the same as select but normally SQL keywords are written in uppercase.
How is a SQL statement ended?
With a semi-colon ; Some databases require a semicolon at the end of each SQL statement. It is the standard way to separate each SQL statement in database systems that allow more than one SQL statement to be executed in the same call to the server.
A database contains one or more _____?
Tables
A table is identified by a _____?
Name
How would you select all records in a table called “Customers” ?
SELECT * FROM Customers;
Pay attention to syntax!
What are the 11 “Most Important SQL Commands?”
SELECT
UPDATE
DELETE
INSERT INTO
CREATE DATABASE
ALTER DATABASE
CREATE TABLE
ALTER TABLE
DROP TABLE
CREATE INDEX
DROP INDEX
What does SELECT do?
extracts data from a database
What does UPDATE do?
updates data in a database
What does DELETE do?
deletes data (rows) from a database
What does INSERT INTO do?
inserts new records into a database
What does CREATE DATABASE do?
creates a new database
What does ALTER DATABASE do?
modifies a database
What does CREATE TABLE do?
creates a new table
What does ALTER TABLE do?
modifies a table
What does DROP TABLE do?
deletes a table
What does CREATE INDEX do?
creates an index (search key)
What does DROP INDEX do?
deletes an index
What statement creates a new table?
CREATE TABLE
What statement deletes a table?
DROP TABLE
What statement creates a search key?
CREATE INDEX




