Build and Accesing MySQL Database Using XAMPP
Build and Accesing MySQL Database Using XAMPP
USING XAMPP
Achmad Adyatma Ardi1
Programmer, Data Scientist, Engineer
*Corresponding author : [email protected]
Saturday, June 4, 2022
Abstract
Data science is a discipline where we try to answer questions that is needed instead of
using a mere assumption, we use data and logical thinking to answer that question
with a belief. In a business purposes, even though the value of uncertainty is always
there, it would be wise to make decisions based on the data you have. Data can be
your best friend in making important decisions. On this occasion, I will try to analyze
the data with the aim of answering important business-related questions using the
Python programming language with Pandas and Matplotlib libraries. Hope you enjoy
it!
Keyword : data science, python programming, sales analysis, python pandas, python
matplotlib, answer questions
Table of contents :
Ch. 1 Introduction....................................1
Ch. 2 Introduction....................................2
Additional attachment :
Attachment. 1 SQL Queries and Examples3
Attachment. 2..........................................4
Attachment. 3..........................................4
Attachment. 4..........................................4
currently enjoying widespread,
effective use regardless of industry,
Ch. 1 Introduction it’s clear that anyone involved with
enterprise data or general IT should at
MySQL is one of the most least aim for a basic familiarity of
recognizable technologies in the MySQL.
modern big data ecosystem. Often With MySQL, even those new to
called the most popular database and relational systems can immediately
https://www.rose-hulman.edu/
class/csse/csse290-
WebProgramming/201520/
SupportCode/SQL-setup.html
References
https://pynative.com/python-mysql-
database-connection/
https://www.educba.com/what-is-
xampp/
Additional Attachment
SQL Queries and Examples
Db : Customers
CustomerID CustomerName ContactName Address City PostalCode Country
1 Alfreds Futterkiste Alfred Schmidt Obere Str. 57 Frankurt 12209 Germany
Ana Trujillo Avda. de la
2 Ana Trujillo México D.F. 05021 Mexico
Emparedados y helados Constitución 2222
Antonio Moreno
3 Antonio Moreno Mataderos 2312 México D.F. 05023 Mexico
Taquería
4 Around the Horn Thomas Hardy 120 Hanover Sq. London WA1 1DP UK
(new record) 5 Achmad Adyatma Ardi Achmad Taman ubud Tangerang 15810 Indonesia
(new record) 6 Laiba nafisah null null Tangerang null Indonesia
(update rec) 7 Laiba nafisah Laiba null Bogor null Indonesia
Ana Trujillo Avda. de la
(update 8 Humaira México D.F. 05021 Mexico
Emparedados y helados Constitución 2222
multiple
Antonio Moreno
records) 9 Humaira Mataderos 2312 México D.F. 05023 Mexico
Taquería
Db : Products
ProductID ProductName SupplierID CategoryID Quantity Unit Price
1 Chais 1 1 2 10 boxes x 20 bags 18
2 Chang 1 1 4 24 - 12 oz bottles 19
3 Aniseed Syrup 1 2 2 12 - 550 ml bottles 10
Chef Anton’s Cajun 48 - 6 oz jars
4 2 2 3 22
Seasoning
Chef Anton’s 36 boxes
5 2 2 1 21.35
Gumbo Mix
Db : Suppliers
SupplierID SupplierName ContactNam Address City PostalCode Country Phone
e
1 Exotic Liquid Charlotte 49 Gilbert St. London EC1 4SD UK (171) 555 –
4 | Achmad Adyatma Ardi
2222
P.O. Box (100) 555 –
2 New Orleans Shelley New Orleans 70117 USA
78934 4822
Grandma Kelly’s 707 Oxford (313) 555 –
3 Regina Ann Arbor 48104 USA
Homestead Rd. 5735
9 – 8 Sekimai
(03) 3555 –
4 Tokyo Traders Yoshi Musashino – Tokyo 100 Japan
5011
shi
Db: Orders
OrderID CustomerID EmployeeID OrderDate ShipperID
10248 90 5 7/4/1996 3
10249 81 6 7/5/1996 1
10250 34 4 7/8/1996 2
10251 84 3 7/9/1996 1
10252 76 4 7/10/1996 2
Some of the most important SQL Commands 1. The SQL SELECT Statement
SELECT – extracts data from a database Usage : select data from a database
UPDATE – updates data in a database Syntax :
DELETE – deletes data from a database 1. Specified field
INSERT INTO – inserts new data into a database SELECT column1, column2,..
CREATE DATABASE – creates a new database FROM table_name;
ALTER DATABASE – modifies a database
CREATE TABLE – creates a new table 2. All fields
ALTER TABLE – modifies a table SELECT * FROM table_name;
DROP TABLE – deletes a table Example :
CREATE INDEX – creates an index (search key)
DROP INDEX – deletes an index SELECT CustomerName, City FROM Customers;
Number of records : 4
CustomerName City
Alfreds Futterkiste Frankurt
Ana Trujillo Emparedados y México D.F.
helados
SELECT * CustomerName
- All records of db Customers
2. The SQL SELECT DISTINCT Statement 3. The SQL WHERE Clause
Usage : return only distint (different) values Usage : used to extract only those records that fulfill a specified
Syntax : condition
SELECT DISTINCT column1, column2,… Syntax :
FROM table_name; SELECT column1, column2,…
Example : FROM table_name
WHERE condition;
SELECT DISTINCT Country FROM Customers; Example :
Number of records : 1
CustomerID City
1 Frankurt
CustomerID Country
2 Frankurt
3 México D.F
4. The SQL AND, OR and NOT Operators 5. The SQL ORDER BY Keyword
Usage : combine with WHERE clause, AND and OR operators are Usage : used to sort the result – set in ascending or descending
used to filter records based on more than one condition order. To sort the records in descending order, use the DESC
Syntax : keyword (ascending order by default)
1. AND Syntax :
SELECT column1, column2,… SELECT column1, column2, …
FROM table_name FROM table_name
WHERE condition1 AND condition2 AND condition3,…; ORDER BY column1, column2, …ASC |DESC;
Example :
2. OR
SELECT column1, column2,… SELECT CustomerID, ContactName FROM Customers
7 | Achmad Adyatma Ardi
FROM table_name ORDER BY CustomerID DESC;
WHERE condition1 OR condition2 OR condition3,…;
Number of records : 4
3. NOT CustomerID ContactName
SELECT column1, column2,… 4 Alfred Schmidt
FROM table_name 3 Ana Trujillo
WHERE NOT condition, 2 Antonio Moreno
1 Thomas Hardy
Example :
1. AND - ORDER BY several columns
SELECT CustomerID, Country FROM Customers
WHERE Country=’Germany’ AND City=’Frankurt’; SELECT CustomerID, ContactName, Country FROM
Customers
Number or records : 1 ORDER BY Country ASC, CustomerID DESC;
CustomerID Country
1 Germany Number of records : 4
CustomerID ContactName Country
2. OR 1 Thomas Hardy Germany
SELECT CustomerID, Country FROM Customers 3 Ana Trujillo Mexico
WHERE Country=’Germany’ OR City=’Tangerang’; 2 Antonio Moreno Mexico
4 Alfred Schmidt UK
Number of records : 1
CustomerID Country
1 Germany
Note. the city of tangerang is not in the Customers database
but it still evaluates to true because one of the conditions is
true
3. NOT
SELECT CustomerID, Country FROM Customers
WHERE NOT Country=’Germany’
Number of records : 3
CustomerID Country
2 Mexico
3 Mexico
4 UK
8 | Achmad Adyatma Ardi
Combining AND, OR and NOT
- You can also combine the AND, OR, and NOT operators
1. Example 1
SELECT CustomerID, PostalCode FROM Customers
WHERE Country = ‘Germany’ AND (City=London OR
City=’Frankurt’)
Number of records : 1
CustomerID PostalCode
1 12209
2. Example 2
SELECT CustomerID, CustomerName FROM Customers
WHERE NOT Country = ‘Mexico’ AND NOT City = ‘London’;
Number of records : 1
CustomerI CustomerName
D
1 Alfreds Futterkiste
Example : Example :
1. All records 1. IS NULL
SELECT CustomerName, ContactName, Address
INSERT INTO Customers (CustomerName, ContactName, FROM Customers
Address, City, PostalCode, Country) WHERE Address IS NULL;
VALUES (‘Achmad Adyatma Ardi’, ‘Achmad’, ‘Taman ubud’,
‘Tangerang’, ‘15810’, ‘Indonesia’); CustomerName ContactName Address
Laiba nafisah null null
Output : all records + new records (Customer ID = 5)
Usage : used to modify the existing records in a table Usage : used to delete records in a table
Syntax : Syntax :
UPDATE table_name 1. Specific row
SET column1 = value1, column2 = value2, … DELETE FROM table_name WHERE condition;
WHERE condition; 2. All rows
Warning : be careful when updating records in a table! Notice the DELETE FROM table_name
WHERE clause in the UPDATE statement. The WHERE clause
specifies which record(s) that should be updated. If you omit the Example :
WHERE clause, all records in the table will be updated! 1. Specific row
DELETE FROM Customers WHERE CustomerName =
Example : ‘Alfreds Futterkiste’;
1. Update one records
Output :
10 | Achmad Adyatma Ardi
UPDATE Customers delete records with CustomerName is ‘Alfreds
SET ContactName = ‘Laiba’, City = ‘Bogor’ Futterkiste’
WHERE CustomerID = 6;
2. All rows
Output : DELETE FROM Customers;
CustomerID = 7
Output :
2. Update multiple records Delete all rows in the ‘Customers’ table, without
UPDATE Customers deleting the table
SET ContactName = ‘Humaira’
WHERE Country = ‘Mexico’;
Output :
CustomerID = 8 & 9
10. The SQL TOP, LIMIT, FETCH FIRST or ROWNUM 11. The SQL MIN() and MAX() Functions
Clause
Usage : MIN() function returns the smallest value of the
Usage : used to specify the number of records to return, its useful selected column, meanwhile MAX() function returns the largest
because returning a large number of records can impact performance value of the selected column
Note : not all database system support the SELECT TOP clause. Syntax :
MySQL supports the LIMIT clause to select a limited number of 1. MIN ()
records, while Oracle uses FETCH FIRST n ROWS ONLY and SELECT MIN(column_name)
ROWNUM FROM table_name
Syntax : WHERE condition;
1. SQL Server / MS Access
SELECT TOP number|percent column_name(s) 2. MAX ()
FROM table_name SELECT MAX(column_name)
WHERE condition; FROM table_name
WHERE condition;
2. MySQL
SELECT column_name(s) Example :
FROM table_name 1. MIN()
WHERE condition SELECT MIN(Price) AS SmallestPrice
LIMIT number; FROM Products;
Example :
1. SQL Server / MS Access
SELECT TOP 3 * FROM Customers;
2. MySQL
SELECT * FROM Customers
LIMIT 3;
3. Oracle
SELECT * FROM Customers
FETCH FIRST 3 ROWS ONLY;
5. Oracle (PERCENT)
SELECT * FROM Customers
FETCH FIRST 50 PERCENT ROWS ONLY;
Example :
1. COUNT()
SELECT COUNT(ProductID)
FROM Products;
Output :
COUNT(ProductyID)
5
2. AVG()
SELECT AVG(Price)
FROM Products;
Output :
14 | Achmad Adyatma Ardi
AVG(Price)
18.07
3. SUM()
SELECT SUM(Quantity)
FROM OrderDetails;
Output :
SUM(Quantity)
12
Output :
COUNT(ProductID)
2
Usage : used to substitute one or more characters in a string, its used Usage : allows you to specify multiple values in a WHERE
with the LIKE operator. The LIKE operator is used in a WHERE clause, it’s a shorthand for multiple OR conditions
clause to search for a specified pattern in a column Syntax :
1. Way 1
Wildcard Characters : SELECT column_name(s)
MS Access FROM table_name
WHERE column_name IN (value1, value2, ...);
Symbol Description Example
Represents zero or more bl* finds bl, black, 2. Way 2
*
characters blue, and blob SELECT column_name(s)
h?t finds hot, hat, FROM table_name
? Represents a single character
and hit WHERE column_name IN (SELECT STATEMENT);
Represents any single character h[oa]t finds hot and
[] Example :
within the brackets hat, but not hit
15 | Achmad Adyatma Ardi
Represents any character not in
h[!oa]t finds hit, but 1. IN
!
the brackets not hot and hat SELECT ContactName, City FROM Customers
Represents any single character
c[a-b]t finds cat and WHERE City IN (‘Frankurt’, ‘London’, ‘Bogor’);
-
within the specified range cbt
2#5 finds 205, 215, Output :
Represents any single numeric 225, 235, 245, 255, ContactName City
# Alfred Schmidt Frankurt
character 265, 275, 285, and
295 Thomas Hardy London
Laiba Bogor
SQL Server
(Select all records that are ‘City’ located in ‘Frankurt’,
Symbol Description Example ‘London’, or ‘Bogor’)
Represents zero or more bl% finds bl, black,
% 2. NOT IN
characters blue, and blob
h_t finds hot, hat, SELECT ContactName, City FROM Customers
_ Represents a single character WHERE Country NOT IN (‘México D.F.’,
and hit
Represents any single character h[oa]t finds hot and ‘Tangerang’, ‘Bogor’);
[]
within the brackets hat, but not hit
Represents any character not in h[^oa]t finds hit, but Output :
^ ContactName City
the brackets not hot and hat
Represents any single character c[a-b]t finds cat and Alfred Schmidt Frankurt
- Thomas Hardy London
within the specified range cbt
Note : MySQL used % and _ wildcards only (Select all records that are ‘City’ NOT located in
‘México D.F.’, ‘Tangerang’, or, ‘Bogor’)
Example :
1. % 3. Other database
SELECT CustomerID, ContactName, Country FROM SELECT ContactName, City FROM Customers
Customers WHERE City IN (SELECT City FROM Suppliers);
WHERE Country LIKE ‘me%’;
ContactName City
Output : Thomas Hardy London
CustomerID ContactName Country
2 Ana Trujillo Mexico (Select all records that are from the same Cities as the
3 Antonio Moreno Mexico Suppliers)
8 Humaira Mexico
2. _
SELECT CustomerID, ContactName, Country FROM
Customers
WHERE Country LIKE ‘k’;
3. [ ]
SELECT * FROM Customers
WHERE Country LIKE ‘[gu]%’;
4. [ - ]
SELECT CustomerID, ContactName, Country FROM
Customers
WHERE Country LIKE ‘[i-m]%’;
(Select all records with a Country starting with the letter ‘i’ to
‘m’)
5. [!]
SELECT CustomerID, ContactName, Country FROM
Customers
WHERE Country LIKE ‘[!gmi]%’;
(Select all records with a Country NOT starting with ‘g’, ‘m’
or ‘i’)
6. NOT LIKE [ ]
SELECT CustomerID, ContactName, Country FROM
Customers
WHERE Country NOT LIKE ‘[mu]%’;
Usage : used to select values within a given range. The values can be Usage :
numbers, text, or dates. Begin and end values are included - SQL aliases are used to give a table, or a column in a
table, a temporary name. Aliases are often used to make
Syntax : column names more readable
SELECT column_name(s) - An alias only exists for the duration of that query
18 | Achmad Adyatma Ardi
FROM table_name - An alias is created with the AS keyword
WHERE column_name BETWEEN value1 AND value2 Syntax :
ORDER BY column_name ASC | DESC; (optional) 1. Alias column
Example : SELECT column_name AS alias_name
1. BETWEEN FROM table_name;
SELECT ProductName, Price FROM Products
WHERE Price BETWEEN 10 AND 20 2. Alias table
ORDER BY Price ASC; SELECT column_name(s)
FROM table_name AS alias_name;
ProductName Price
Aniseed Syrup 10 Example :
Chais 18 1. Alias for
Chang 19
2. NOT BETWEEN
SELECT ProductName, Price FROM Products
WHERE Price NOT BETWEEN 10 AND 20;
ORDER BY Price ASC;
ProductName Price
Chef Anton’s Gumbo Mix 21.35
Chef Anton’s Cajun Seasoning 22
3. BETWEEN with IN
SELECT ProductName, Price FROM Products
WHERE Price BETWEEN 10 AND 21.35
AND CategoryID NOT IN (1, 3);
ORDER BY ProductName DESC;
ProductID ProductName
3 Aniseed Syrup
1 Chais
2 Chang
ProductID ProductName
4 Chef Anton’s Cajun
Seasoning
5 Chef Anton’s Gumbo
Mix
OrderID OrderDate
10248 7/4/1996
10249 7/5/1996
b. 1996-07-01 (year/month/date)
SELECT OrderID, OrderDate FROM Orders
WHERE OrderDate BETWEEN '1996-07-05' AND '1996-
07-09';
OrderID OrderDate
10249 7/5/1996
20 | Achmad Adyatma Ardi
10250 7/8/1996
10251 7/9/1996
18. The SQL Joins 19. The SQL INNER JOIN Keyword
Syntax : Syntax :
1. Specified field 1. Specified field
SELECT column1, column2,.. SELECT column1, column2,..
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
20. The SQL LEFT JOIN Keyword 21. The SQL RIGHT JOIN Keyword
Syntax : Syntax :
1. Specified field 1. Specified field
SELECT column1, column2,.. SELECT column1, column2,..
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
22. The SQL FULL OUTER JOIN Keyword 23. The SQL Self Join
Syntax : Syntax :
1. Specified field 1. Specified field
SELECT column1, column2,.. SELECT column1, column2,..
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
Syntax : Syntax :
1. Specified field 1. Specified field
SELECT column1, column2,.. SELECT column1, column2,..
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
26. The SQL HAVING Clause 27. The SQL EXISTS Operator
Syntax : Syntax :
1. Specified field 1. Specified field
SELECT column1, column2,.. SELECT column1, column2,..
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
28. The SQL ANY and ALL Operators 29. The SQL SELECT INTO Statement
Syntax : Syntax :
1. Specified field 1. Specified field
SELECT column1, column2,.. SELECT column1, column2,..
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
30. The SQL INSERT INTO SELECT Statement 31. The SQL CASE Statement
Syntax : Syntax :
1. Specified field 1. Specified field
22 | Achmad Adyatma Ardi
SELECT column1, column2,.. SELECT column1, column2,..
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
32. The SQL NULL Functions 33. The SQL Stored Procedures for SQL Server
Syntax : Syntax :
1. Specified field 1. Specified field
SELECT column1, column2,.. SELECT column1, column2,..
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
Syntax : Syntax :
1. Specified field 1. Specified field
SELECT column1, column2,.. SELECT column1, column2,..
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
36. The SQL CREATE DATABASE Statement 37. The SQL DROP DATABASE Statement
Syntax : Syntax :
1. Specified field 1. Specified field
SELECT column1, column2,.. SELECT column1, column2,..
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
23 | Achmad Adyatma Ardi
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
38. The SQL BACKUP DATABASE Statement 39. The SQL CREATE TABLE Statement
Syntax : Syntax :
1. Specified field 1. Specified field
SELECT column1, column2,.. SELECT column1, column2,..
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
40. The SQL DROP TABLE Statement 41. The SQL ALTER TABLE Statement
Syntax : Syntax :
1. Specified field 1. Specified field
SELECT column1, column2,.. SELECT column1, column2,..
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
42. The SQL Constraints 43. The SQL NOT NULL Constraint
Syntax : Syntax :
1. Specified field 1. Specified field
SELECT column1, column2,.. SELECT column1, column2,..
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
44. The SQL UNIQUE Constraint 45. The SQL PRIMARY KEY Constraint
24 | Achmad Adyatma Ardi
Syntax : Syntax :
1. Specified field 1. Specified field
SELECT column1, column2,.. SELECT column1, column2,..
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
46. The SQL FOREIGN KEY Constraint 47. The SQL CHECK Constraint
Syntax : Syntax :
1. Specified field 1. Specified field
SELECT column1, column2,.. SELECT column1, column2,..
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
48. The SQL DEFAULT Constraint 49. The SQL CREATE INDEX Statement
Syntax : Syntax :
1. Specified field 1. Specified field
SELECT column1, column2,.. SELECT column1, column2,..
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
50. The SQL AUTO INCREMENT Field 51. The SQL Working With Dates
Syntax : Syntax :
1. Specified field 1. Specified field
SELECT column1, column2,.. SELECT column1, column2,..
25 | Achmad Adyatma Ardi
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
52. The SQL Views 53. The SQL SELECT DISTINCT Statement
Syntax : Syntax :
1. Specified field 1. Specified field
SELECT column1, column2,.. SELECT column1, column2,..
FROM table_name; FROM table_name;
2. All fields 2. All fields
SELECT * FROM table_name; SELECT * FROM table_name;
Example : Example :
SELECT CustomerName, City FROM Customers; SELECT CustomerName, City FROM Customers;
54. The SQL Hosting 55. The SQL Data Types for MySQL, SQL Server, and
MS Access
Syntax :
1. Specified field Syntax :
SELECT column1, column2,.. 1. Specified field
FROM table_name; SELECT column1, column2,..
2. All fields FROM table_name;
SELECT * FROM table_name; 2. All fields
Example : SELECT * FROM table_name;
SELECT CustomerName, City FROM Customers; Example :
SELECT CustomerName, City FROM Customers;
Attachment. 2
Attachment. 3
Attachment. 4