SELECT sum(column_name)
FROM table_name
WHERE condition;
SELECT COUNT(column_name)
FROM table_name
WHERE condition;
SELECT avg(column_name)
FROM table_name
WHERE condition;
Back
LIKE
Front
WHERE CustomerName LIKE 'a%'Finds any values that start with "a"
WHERE CustomerName LIKE '%a'Finds any values that end with "a"
WHERE CustomerName LIKE '%or%'Finds any values that have "or" in any position
WHERE CustomerName LIKE '_r%'Finds any values that have "r" in the second position
WHERE CustomerName LIKE 'a_%_%'Finds any values that start with "a" and are at least 3 characters in length
WHERE ContactName LIKE 'a%o'Finds any values that start with "a" and ends with "o"
Back
what command removes all rows from a table
Front
truncate table tableName;
Back
select all from books
Front
select * from books;
Back
update rows in a table
Front
UPDATE table_name
SET column1 = value1, column2 =value2, ...
WHERE condition;
Back
modify column fname in table customers to variable character length of 15
Front
alter table customers modify (fname varchar(15));
Back
min( ) max( )
Front
SELECT MIN(column_name)
FROM table_name
WHERE condition;
SELECT MAX(column_name)
FROM table_name
WHERE condition;
Back
what command puts a new tow of data into a table
Front
insert into tableName ( value, value, value);
Back
remove table books
Front
drop table books;
Back
foreign key alter table
Front
ALTER TABLE Orders
ADD FOREIGN KEY (PersonID)REFERENCES Persons(PersonID);
with constraint name
ALTER TABLE Orders
ADD CONSTRAINT FK_PersonOrder
FOREIGN KEY (PersonID) REFERENCESPersons(PersonID);