SQL

Description

SQL -BY sam wright
Sam Wright
Flashcards by Sam Wright, updated more than 1 year ago
Sam Wright
Created by Sam Wright almost 8 years ago
13
0

Resource summary

Question Answer
SQL BY SAM - WRIGHT
SELECT USED TO SELETCT DATA FROM A DATABASE. SELECT column_name, column_name
FROM USED TO TELL WHICH TABLE DATA IS BEING RETRIEVED FROM. FROM table_name;
LIKE USED IN A WHERE CLAUS TO SEARCH FOR A SPECIFIED PATTERN IN A COLUMN. SELECT column_name FROM table_name Where column_name LIKE pattern;
AND DISPLAYS A RECORD IF BOTH CONFITIONS ARE TRUE. SELECT * FROM table_name WHERE column_name='condition_1' AND coulumn_name='condition_2'
OR DISPLAYS A RECORD IF EITHER CONDITIONS ARE TRUE. SELECT * FROM table_name WHERE column_name='condition_1' OR coulumn_name='condition_2'
DELETE USED TO DELETE ROWS IN A TABLE. DELETE FROM table_name WHERE column_name=some_value;
INSERT USED TO INSERT NEW RECORDS IN A TABLE. INSERT INTO table_name VALUES (value1,value2,value3,...);
DROP USED TO DELETE AN INDEX IN A TABLE. DROP INDEX index_name ON table_name
TRUNCATE USED TO DELETE DATA INSIDE THE TABLE, BUT NOT THE TABLE ITSELF. TRUNCATE TABLE table_name
JOIN USED TO SELECT ALL ROWS FROM BOTH TABLES AS LONG AS THERE IS A MATCH BETWEEN THE COLUMNS IN BOTH TABLES. SELECT column_name FROM table1 INNER JOIN table2 ON table1.column_name=table2.column_name;
WILDCARDS USED TO SEARCH DATA WITHIN TABLE. % A substitute for zero or more characters. _ A substitute for a single character [charlist] Sets and ranges of characters to match
Show full summary Hide full summary

Similar

Types and Components of Computer Systems
Jess Peason
Input Devices
Jess Peason
Output Devices
Jess Peason
Computing
Kwame Oteng-Adusei
Pack of playing cards answer
Karl Taylor
Code Challenge Flow Chart
Charlotte Hilton
Computing Hardware - CPU and Memory
ollietablet123
Computer Systems
lisawinkler10
Computer science quiz
Ryan Barton
Input, output and storage devices
Mr A Esch
STEM AND LEAF DIAGRAMS
Elliot O'Leary