SQL - Introduction To SQL - L1
SQL - Introduction To SQL - L1
Introduction to SQL
By: Wahib Ladham
YEU@2024
Contents of this Lecture
Here’s what you’ll find in this Lecture:
SQL is the standard language to communicate with Relational Database Systems. All the
Relational Database Management Systems (RDMS) like MySQL, MS Access, Oracle, Sybase,
Informix, Postgres and SQL Server use SQL as their Standard Database Language.
Case Sensitivity:
The most important point to be noted here is that SQL is case insensitive, which means SELECT
and Select have same meaning in SQL statements. Whereas, MySQL makes difference in table
names. So, if you are working with MySQL, then you need to give table names as they exist in
the database.
SQL Statements (commands)
Naming Rules
• Table names and column names must begin with a letter and be 1–30 characters long.
• Names must contain only the characters A–Z, a–z, 0–9, _ (underscore), $,
and # (legal characters, but their use is discouraged).
• Names must not duplicate the name of another object owned by the same Oracle server user.
• Names must not be an Oracle server reserved word.
• Use descriptive names for tables and other database objects.
• Note: Names are case-insensitive. For example, EMPLOYEES is treated as the same name as
eMPloyees or eMpLOYEES.
Data Types
An SQL data type refers to the type
of data which can be stored in a
column of a database table. In a
column, the user can store numeric,
string, binary, etc by defining data
types.
For example integer data, character
data, monetary data, date and time
data, binary strings, and so on.
While creating a database table in a
database, we need to specify
following two attributes to define a
table column –
• Name of the column
• Data type of the column
Table Example
Resources
SQL at:
WEBSITE: docs.oracle.com
WEBSITE: www.tutorialspoint.com/
WEBSITE: geeksforgeeks.org