Finals Reviewer
Finals Reviewer
NOT NULL – a column will not have null values. ROLLBACK – restores data to their original
values.
UNIQUE – a column will not have a duplicate
values. =, <, >, <=, >= (Comparison operator)
– used in a conditional
PRIMARY KEY – defines a primary key for a expressions.
table.
AND/OR/NOT (Logical operator)
FOREIGN KEY – defines a foreign key for a – used in a conditional
table. expressions.
DROP VIEW – permanently deletes a view. COUNT – Returns the number of rows with non-
null values for a given column.
INSERT – inserts rows into a table.
MIN – Returns the minimum attribute value found
SELECT – selects attributes from rows in one or in a given column.
more tables or views.
MAX – Returns the maximum attribute value
• WHERE – restricts the selection of rows found in a given column.
based on a conditional expression.
SUM – Returns the sum of all values for a given
• GROUP BY – groups the selected rows column.
based on one or more attributes.
AVG – Returns the average of all values for a
given column.
LAN [Local Area Network] Switching is classified into three types:
- Group of devices connecting the
computers and other devices over a short 1. Circuit Switching
distance like office or home. 2. Packet Switching
3. Message Switching
WLAN [Wireless local area network]
- Similar to LAN with the difference that
uses wireless between devices instead of wired HTTP (Hypertext Transfer Protocol)
connection.
IP (Internet protocol or IP addresses)
CAN [Campus Area Network]
- closed corporate communication system, TCP (Transmission Control Protocol)
mobile network that may contain a private or
public. UDP (User Datagram Protocol)
• datatype parameter specifies the type of CHECK - the values in a column satisfies a
data the column can hold (e.g. varchar, specific condition.
integer, date, etc.). DEFAULT - Sets a default value for a column if no
CREATE TABLE USING ANOTHER TABLE value is specified.
The WHERE clause is used to filter records. 2. Adding values for all the columns of the
table
It is used to extract only those records that
fulfill a specified condition. INSERT INTO table_name
Numeric: SELECT * FROM Customers WHERE CustomerID = 1; NULL is a special marker used to indicate that a
data value in a database does not exist in the
database. A field with a NULL value is a field with
The AND operator displays a record if all the no value.
conditions separated by AND are TRUE. Syntax:
The ORDER BY clause is used to sort the result SET PostalCode = 4027
set of a query in ascending or descending order WHERE Province = 'Laguna';
based on one or more columns. The ORDER BY
keyword sorts the records in ascending order by
default. DELETE Statement removes records from a
Syntax: table based on a condition.
SELECT column1, column2, ... DELETE FROM table_name WHERE condition;
SELECT column_name(s)
FROM table_name
WHERE condition
LIMIT number;
OFFSET Clause
SELECT * FROM Customers
LIMIT 10 OFFSET 4;