SQL & Relational Data Bases Flashcards
SQL definition
structured query language is used to communicate with a database. SQL is used to manipulate databases and retrieve records
SELECT query
used to retrieve records from a data table
UPDATE query
used to manipulate records that already exist in a data table and change the values
INSERT query
used to add additional records into a data table
DELETE query
Used to remove records from a data table
Show how to: retrieve all records from TBLPRODDUTS data table
SEECT *
FROM tblProducts;
Show how to: retrieve the item,price and description fields from tblproducts when using the searchterm of ‘‘toy’’
SELECT item , price , descrition
FROM tblproducts
WHERE searchterm = ‘‘toy’’;
Show how to: change the password for employeeID 8 in the TBLEMPLOYEES data table
UPDATE tblemployees
SET password = ‘‘H%3nuAF$2’’
WHERE employeeID = 8;
Show how to: add a new record into the tblFriends table for firstname Rachel and surname Green
INSERT INTO(firstname,surname)
VALUES(‘‘Rachel’’ , ‘‘Green’’)
Show how to: remove all the student records in tblstudents but only when students are older than 31/08/2005
DEETE FROM tblstudents
WHEER DOB <31/08/2005