Criado por Sam Wright
mais de 7 anos atrás
|
||
Questão | Responda |
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 |
Quer criar seus próprios Flashcards gratuitos com GoConqr? Saiba mais.