SQL
Write how you would select all the values from a database | SELECT * FROM table_name; |
SQL
Write how you would select the values from a column from a database | SELECT column1 FROM table_name; |
SQL
Write how you would select a few columns from a database | SELECT column1, column2, columnN... FROM table_name; |
In a general way use SQL to define a database | CREATE TABLE table_name (
column1 datatype,
column2 datatype,
column3 datatype,
....
); |
With SQL, define a database of a 'Garage' with columns for: PartsNo
Customers
Employees
Completed | CREATE TABLE Garage int Key
(
PartsNo int,
Customers string,
Employees string,
Completed bool
); |
SQL
Write how you would update all the values in a database | UPDATE table_name
SET column1 = value1, column2 = value2, ... |
SQL
Write how you would update all specific values in a database | UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition |
SQL
Write the line(s) for delete all the rows in a table without deleting the table | DELETE FROM table_name; |
SQL
Write the line(s) for delete existing records in a table | DELETE FROM table_name where CONDITION = TRUE; |
SQL
Write the line(s) to insert into a table | INSERT INTO table_name (column1, column2, column3, ...)
VALUES (value1, value2, value3, ...); |
SQL
How would you compare and return matching data from more than one table | SELECT Table1.ColumnX, Table2.ColumnY, Table2.ColumnX, ...
FROM Table1, Table2, ...
WHERE Table1.ColumnZ = Table2.ColumnZ
The selct is whats going to be printed as a new table
The from is just every table you want to use
The where is the condtion on whats selected |
SQL
How would you use the Between command in SQL langauge | SELECT * FROM Table
WHERE Column BETWEEN number1 AND number2; |