4.10 SQL Basic Commands Flashcards
1
Q
What is SQL?
A
SQL is a declarative language that is used for querying and updating tables in a relationship database
2
Q
How is the Select statement used?
A
Select *
From * Table
Where Condition
3
Q
How do you Specify a specific order in SQL?
A
Select * From * Where Condition AND Order By \_\_\_\_\_\_
4
Q
How do you extract data from several Tables?
A
Syntax: tablename.fieldname
5
Q
How do you Define a Database Table?
A
To define a Data-Base table CREATE TABLE: \_\_\_\_\_\_\_ Emp.ID (Primary key) Emp.Name HireDate Salary
6
Q
How do you Insert data Using SQL?
A
INSERT INTO tableName (column1, column2)
VALUES (values1, values2)
7
Q
How do you Update data Using SQL?
A
UPDATE tableName
SET column1 = value1 column 2 = value 2
WHERE condition
8
Q
How do you Delete Data Using SQL?
A
DELETE FROM tableName
WHERE Condition
9
Q
WHEN DO YOU USE AND??
A
ONLY USE AND WITH A FOREIGN KEY