SQL
Help!
|
|
||||
---|---|---|---|---|---|
show | SELECT <colName1>, <colName2> FROM <table name> WHERE <colNam3> = <param>
🗑
|
||||
AND/OR | show 🗑
|
||||
ORDER BY | show 🗑
|
||||
INSERT INTO _____ VALUES | show 🗑
|
||||
UPDATE _______ SET | show 🗑
|
||||
DELETE | show 🗑
|
||||
TOP | show 🗑
|
||||
LIKE | show 🗑
|
||||
show | A substitute for zero or more characters
🗑
|
||||
_ | show 🗑
|
||||
[^charlist] or [!charlist] | show 🗑
|
||||
IN | show 🗑
|
||||
BETWEEN | show 🗑
|
||||
ALIAS | show 🗑
|
||||
show | SELECT Persons.LastName, Persons.FirstName, Orders.OrderNo
FROM Persons
INNER JOIN Orders
ON Persons.P_Id=Orders.P_Id
ORDER BY Persons.LastName
🗑
|
||||
show | SELECT Persons.LastName, Persons.FirstName, Orders.OrderNo
FROM Persons
LEFT JOIN Orders
ON Persons.P_Id=Orders.P_Id
ORDER BY Persons.LastName
🗑
|
||||
RIGHT JOIN | show 🗑
|
||||
show | SELECT Persons.LastName, Persons.FirstName, Orders.OrderNo
FROM Persons
FULL JOIN Orders
ON Persons.P_Id=Orders.P_Id
ORDER BY Persons.LastName
🗑
|
||||
show | SELECT column_name(s) FROM table_name1
UNION
SELECT column_name(s) FROM table_name2
🗑
|
||||
show | SELECT column_name(s) FROM table_name1
UNION ALL
SELECT column_name(s) FROM table_name2
🗑
|
||||
show | SELECT column_name(s)
INTO new_table_name [IN externaldatabase]
FROM old_tablename
SELECT *
INTO Persons_Backup IN 'Backup.mdb'
FROM Persons
🗑
|
||||
show | CREATE DATABASE database_name
🗑
|
||||
show | CREATE TABLE Persons
(
P_Id int,
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City varchar(255)
)
🗑
|
||||
show | -- can't update or add new records w/o having value for notnull constrained col, col has to have value
CREATE TABLE Persons
(
P_Id int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Address varchar(255),
City varchar(255)
)
🗑
|
||||
UNIQUE | show 🗑
|
||||
UNIQUE (multiple columns) | show 🗑
|
||||
UNIQUE (to add after table already created [alter] table) | show 🗑
|
||||
UNIQUE (to remove constraint) | show 🗑
|
||||
PRIMARY KEY | show 🗑
|
||||
show | CREATE TABLE Persons
(
P_Id int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Address varchar(255),
City varchar(255),
CONSTRAINT pk_PersonID PRIMARY KEY (P_Id,LastName)
)
🗑
|
||||
(To add key after table already created): PRIMARY KEY | show 🗑
|
||||
show | ALTER TABLE Persons
DROP CONSTRAINT pk_PersonID
🗑
|
Review the information in the table. When you are ready to quiz yourself you can hide individual columns or the entire table. Then you can click on the empty cells to reveal the answer. Try to recall what will be displayed before clicking the empty cell.
To hide a column, click on the column name.
To hide the entire table, click on the "Hide All" button.
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.
To hide a column, click on the column name.
To hide the entire table, click on the "Hide All" button.
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.
Normal Size Small Size show me how
Normal Size Small Size show me how
Created by:
sjampana920
Popular Engineering sets