Introduction to SQL
Introduction to SQL
What is the meaning of SQL?


SQL means Structured Query Language.

What is SQL?


It is a query lan...
Introduction to SQL
Data Definition Language


Create, Alter, Delete Tables, and their attributes

Data Manipulation Lang...
Example of a Table in SQL
Table Name
Product

Attributes

Product_Code

Product_Name

Product_Price

Category

Manufacture...
Explanation of Table


The Schema of a table is the table name and its attributes:
Product(Product_Code, Product_Name, Pr...
Data Types in SQL
Character:


CHAR



VARCHAR

Numbers:


INT



BIGINT



SMALLINT



DOUBLE



DECIMAL



FLOAT...
Simple SQL Query
Product_Code Product_Name Product_Price

Category

Manufacturer

A0001

Iphone 10s

P100,000.00

Smart Ph...
Details


Case Sensitive
SELECT or Select or select

Product or product
„Bomb Phones‟ or „bomb phones‟



Constant

„Bom...
Elimination SQL Duplicates
Upcoming SlideShare
Loading in …5
×

"><img src="x">

355 views

Published on

"><img src="x">

Published in: Social Media, Technology, Business
1 Comment
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total views
355
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
3
Comments
1
Likes
0
Embeds 0
No embeds

No notes for slide

">&lt;img src="x">

  1. 1. Introduction to SQL
  2. 2. Introduction to SQL What is the meaning of SQL?  SQL means Structured Query Language. What is SQL?  It is a query language that allows user to specify conditions.  Query is a user-request retrieve data or information with a certain condition.
  3. 3. Introduction to SQL Data Definition Language  Create, Alter, Delete Tables, and their attributes Data Manipulation Language  Query one or more tables.  Insert, Delete, and Modify tuples in tables.
  4. 4. Example of a Table in SQL Table Name Product Attributes Product_Code Product_Name Product_Price Category Manufacturer A0001 Iphone 10s P100,000.00 Smart Phones Apple Inc. A0002 Samsung Galaxy S8 P80,000.00 Smart Phones Samsung Inc. A0003 Nokia Lumia 99 P70,000.00 Bomb Phones Nokia Inc. A0004 Facebook Mobile P50,000.00 Smart Phones Facebook Inc. Tupels or Rows
  5. 5. Explanation of Table  The Schema of a table is the table name and its attributes: Product(Product_Code, Product_Name, Product_Price, Category, Manufacturer)  A Key is an attribute whose values is unique Product(Product_Code, Product_Name, Product_Price, Category, Manufacturer)
  6. 6. Data Types in SQL Character:  CHAR  VARCHAR Numbers:  INT  BIGINT  SMALLINT  DOUBLE  DECIMAL  FLOAT Others:  Currency, Date, Time
  7. 7. Simple SQL Query Product_Code Product_Name Product_Price Category Manufacturer A0001 Iphone 10s P100,000.00 Smart Phones Apple Inc. A0002 Samsung Galaxy S8 P80,000.00 Smart Phones Samsung Inc. A0003 Nokia Lumia 99 P70,000.00 Bomb Phones Nokia Inc. A0004 Facebook Mobile P50,000.00 Smart Phones Facebook Inc. SELECT * FROM Product WHERE category='Bomb Phones‟ Product_Code Product_Name Product_Price A0003 Nokia Lumia 99 P70,000.00 Category Manufacturer Bomb Phones Nokia Inc.
  8. 8. Details  Case Sensitive SELECT or Select or select Product or product „Bomb Phones‟ or „bomb phones‟  Constant „Bomb Phone‟ or “Bomb Phone”
  9. 9. Elimination SQL Duplicates

×