0% found this document useful (0 votes)
0 views

SQL for Beginners - Full Notes

The document provides a comprehensive guide on SQL for beginners, covering essential database concepts, SQL commands, and practical examples for executing various SQL operations. It explains topics such as the use of the SELECT command, WHERE clause, relational and logical operators, and the use of keywords like DISTINCT, BETWEEN, IN, LIKE, and LIMIT. Each section includes practical demonstrations to help users understand how to apply these concepts in real SQL queries.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

SQL for Beginners - Full Notes

The document provides a comprehensive guide on SQL for beginners, covering essential database concepts, SQL commands, and practical examples for executing various SQL operations. It explains topics such as the use of the SELECT command, WHERE clause, relational and logical operators, and the use of keywords like DISTINCT, BETWEEN, IN, LIKE, and LIMIT. Each section includes practical demonstrations to help users understand how to apply these concepts in real SQL queries.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 120

01/11/2020 Evernote Export

SQL for Beginners - Database Concepts (Database, DBMS, Data Models, RDBMS and SQL)

In-order to understand SQL, we have to first understand different Database Concepts like:
Database
DBMS
Data Models
RDBS
SQL etc.
Database Concepts:
Databases
The place we can store the related data and later retrieve the data is known as Database
Storing the related Data like Employee ID, Employee Name, Employee Salary, Department
etc. can be stored
Retrieving the data based on some conditions
Database Management Systems
Shortly called as DBMS
Software that stores data in databases in an organized way to make it easier to create, retrieve,
update etc.
Examples: DBase, FoxPro, MySQL, Oracle, MangoDB, MariaDB, SQLite, Cassandra and many more
Data Models
Defines how related data is connected to each other and stored inside the database.
Types of Data Models:
Hierarchical Model
Network Model
Entity-Relationship Model
Relational Model
Data is stored in the form of tables
Tables organize the data in the form of rows and columns
It is a popular and widely used by most of the DBMS Software
RDBMS
DBMS using Relational Data Models are known as RDBMS
Examples for RDBMS Software:
1. Oracle
2. MS-SQL Server
3. DB2
4. MySQL
5. MS-ACCESS
6. etc.
SQL
Programming language for Relational Databases
Stands for Structured Query Language
The following things can be performed on Database using SQL:
Inserting Data
Retrieving Data
Updating Data
Deleting Data
And many more

file:///D:/QAFox/Youtube/SQL for Beginners/Part 1/SQL for Beginners - Part 1 - Database Concepts (Database, DBMS, Data Models, RDBMS an… 1/1
01/11/2020 Evernote Export

SQL for Beginners - Practice SQL without installing any Software

1. Kick start learning or practicing SQL without installing any RDBMS software
2. Google Search for 'W3Schools Try SQL'
3. We don't need to create any DB or tables to get started
1. Existing tables with the required data is in place
4. Start by Restoring the Database
1. If we lose any data by our operations and want it back, we can restore it
5. Executing a sample SQL statement
1. Select * from Customers;

file:///D:/QAFox/Youtube/SQL for Beginners/Part 2/SQL for Beginners - Part 2 - Practice SQL without installing any Software.html 1/1
01/11/2020 Evernote Export

SQL for Beginners - Select Command

1. The purpose this SQL command is to retrieve the data from the tables
2. Retrieving all the data from Customers table
1. Syntax: Select * from TableName;
2. Select * from Customers;
3. Retrieving specific column data from Customers table
1. Select CustomerName from Customers;
2. Select CustomerName,Country,City,PostalCode from Customers;

Regards,
Arun Motoori
QAFox.com

file:///D:/QAFox/Youtube/SQL for Beginners/Part 3/SQL for Beginners - Part 3 - Select Command.html 1/1
01/11/2020 Evernote Export

SQL for Beginners - distinct keyword

1. For unique values to be retrieved, we have to use distinct keyword with Select command
2. Without distinct:
1. Select Country from Customers;
3. With distinct:
1. Select distinct Country from Customers;
2. Select distinct Country,PostalCode from Customers;
1. Combination of Country and PostalCode should be unique

Regards,
Arun Motoori
QAFox.com

file:///D:/QAFox/Youtube/SQL for Beginners/Part 4/SQL for Beginners - Part 4 - distinct keyword.html 1/1
01/11/2020 Evernote Export

SQL for Beginners - SQL is not case sensitive

1. All the below statements will work same irrespective of their case
Select CustomerName,PostalCode from Customers;
select customername,postalcode from customers;
SELECT CUSTOMERNAME,POSTALCODE FROM CUSTOMERS;

Regards,
Arun Motoori
QAFox.com

file:///D:/QAFox/Youtube/SQL for Beginners/Part 5/SQL for Beginners - Part 5 - SQL is not case sensitive.html 1/1
01/11/2020 Evernote Export

SQL for Beginners - Semicolon

1. Mandatory in some RDBMS Software


2. Without Semicolon
3. Why Semicolon
1. Separating Multiple SQL Statements

Regards,
Arun Motoori
QAFox.com

file:///D:/QAFox/Youtube/SQL for Beginners/Part 6/SQL for Beginners - Part 6 - Semicolon.html 1/1


01/11/2020 Evernote Export

SQL for Beginners - Where Clause

1. Purpose is to filter records based on some condition


2. Practice Where Clause:
1. Select * from Customers where City='London';
2. Select * from Customers where CustomerID=9;
3. Select CustomerName,Country,City where City='London';
3. We have used only one operator i.e. Equal Operator in these examples
1. In the upcoming videos, using other operators with Where Clause will be explained.
4. We have used Where Clause with only Select statements
1. In the upcoming videos, using Where Clause with other statements like Update, Delete etc. will be
explained

Regards,
Arun Motoori
QAFox.com

file:///D:/QAFox/Youtube/SQL for Beginners/Part 7/SQL for Beginners - Part 7 - Where Clause.html 1/1
01/11/2020 Evernote Export

SQL for Beginners - Using Relational Operators in Where Clause Condition

1. Different Relational Operators we can use in Where Clause Condition


1. Equal Operator (=)
1. Select * from Products where Price=40;
2. Greater Than Operator (>)
1. Select * from Products where Price>40;
3. Less Than Operator (<)
1. Select * from Products where Price<40;
4. Greater Than Or Equal To Operator (>=)
1. Select * from Products where Price>=40;
5. Less Than Or Equal To Operator (<=)
1. Select * from Products where Price<=40;
6. Not Equal To Operator (<>)
1. Select * from Products where Price<>40;

Regards,
Arun Motoori
QAFox.com

file:///D:/QAFox/Youtube/SQL for Beginners/Part 8/SQL for Beginners - Part 8 - Using Relational Operators in Where Clause Condition.html 1/1
01/11/2020 Evernote Export

SQL for Beginners - Using Logical Operators (AND, OR, NOT)

1. Purpose: To filter the records based on Multiple Conditions


2. Different Logical Operators we can use in Where Clause Condition
1. AND
2. OR
3. NOT
3. Practical Demonstrations:
1. AND
1. Select * from Customers;
2. Select * from Customers where Country='Mexico';
3. Select * from Customers where Country='Mexico' AND CustomerID>3;
4. Select * from Customers where Country='Mexico' AND CustomerID>3 AND
ContactName<>'Francisco Chang';
2. OR
1. Select * from Customers;
2. Select * from Customers where Country='Germany';
3. Select * from Customers where Country='Germany' OR City='London';
4. Select * from Customers where Country='Germany' OR City='London' OR CustomerID>90;
3. NOT
1. Select * from Customers;
2. Select * from Customers where Country='Germany';
3. Select * from Customers where NOT Country='Germany';
4. Select * from Customers where NOT Country='Germany' AND City='London';

By,
Arun Motoori
QAFox.com

file:///D:/QAFox/Youtube/SQL for Beginners/Part 9/SQL for Beginners - Part 9 - Using Logical Operators (AND, OR, NOT).html 1/1
01/11/2020 Evernote Export

SQL for Beginners - Between Operator

1. Purpose is to filter records based on some Range


2. Practical Demonstration:
1. Select * from Products;
2. Select * from Products where Price Between 10 And 20;
1. Select * from Products where Price>=10 And Price<=20;
3. Select * from Products where Price NOT Between 10 And 20;
1. Select * from Products where Price<10 OR Price>20;

Regards,
Arun Motoori
QAFox.com

file:///D:/QAFox/Youtube/SQL for Beginners/Part 10/SQL for Beginners - Part 10 - Between Operator.html 1/1
2/8/23, 12:18 PM SQL for Beginners - Part 11 - Order By Clause (ASC, DESC)

Save Copy to Evernote

Last updated: Apr 23, 2020

SQL for Beginners - Part 11 - Order By


Clause (ASC, DESC)
SQL for Beginners - Order By Clause

1. Purpose is to order the retrieved records in ascending or descending order


2. Practical Demonstration:
1. SELECT * FROM Customers;
2. SELECT * FROM Customers Order By Country;
3. SELECT * FROM Customers Order By Country ASC;
4. SELECT * FROM Customers Order By Country DESC;
5. SELECT * FROM Customers Order By Country ASC,City ASC;
6. SELECT * FROM Customers Order By Country DESC,City DESC;
7. SELECT * FROM Products Order By Price;
8. SELECT * FROM Products Order By Price ASC;
9. SELECT * FROM Products Order By Price DESC;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=c36c7c1f-bc7a-4bcd-83ab-7815c382015a&noteKey=7b7a3c1ddab6af1b&sn=https%3… 1/1
2/8/23, 12:22 PM SQL for Beginners - Part 12 - Using Between Operator with Text

Save Copy to Evernote

Last updated: Apr 23, 2020

SQL for Beginners - Part 12 - Using


Between Operator with Text
SQL for Beginners - Using Between Operator with Text

1. In one the previous video, I have explained how to use Between operator with Numbers
2. Practical Demonstration:
1. Select * from Customers;
2. Select * from Customers Order By Country;
3. Select * from Customers where Country Between 'Canada' And 'Finland' Order By
Country;
4. Select * from Customers where Country NOT Between 'Canada' And 'Finland' Order By
Country;

Regards,
Arun Motoori

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=f66eb57b-b26a-4127-858f-72cd942d37c3&noteKey=b1b5a90053c68442&sn=https%… 1/1
2/8/23, 12:23 PM SQL for Beginners - Part 13 - In Operator

Save Copy to Evernote

Last updated: May 13, 2022

SQL for Beginners - Part 13 - In Operator


SQL for Beginners - In Operator

1. Simplifies providing multiple values in Where Clause, when all the values are from the same
column
2. Practical Demonstration:
1. Select * from Products;
2. Select * from Products where Price=18 OR Price=30 OR Price=10;
3. Select * from Products where Price in (18,30,10);
4. Select * from Customers;
5. Select * from Customers where Country='USA' OR Country='Canada' OR
Country='UK';
6. Select * from Customers where Country in ('USA','Canada','UK');

Regards,
Arun Motoori

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=c2d4a669-2e7d-4e0f-80b4-79b14716357a&noteKey=7f83147f54ac7314&sn=https%3… 1/1
2/8/23, 12:24 PM SQL for Beginners - Part 14 - Like Operator and Wildcard Characters

Save Copy to Evernote

Last updated: Apr 23, 2020

SQL for Beginners - Part 14 - Like


Operator and Wildcard Characters
SQL for Beginners - Like Operator and Wildcard Characters

1. We can use Like Operator and Wildcard Characters for Pattern matching needs
2. We can use them in the Where Clause Conditions
3. Practical Demonstration:
1. Select * from Customers;
2. Select * from Customers Where Country Like '%a';
3. Select * from Customers Where Country Like 'F%';
4. Select * from Customers Where Country Like 'G%Y';
5. Select * from Customers where Country like 'Mex%';
6. Select * from Customers where country like '%nez%';
7. Select * from Customers where country like '%Can%';
8. Select * from Customers where country like '_weden';
9. Select * from Customers where country like 'U_';
10. Select * from Customers where country like '__A';
11. Select * from Customers where country like 'M_x_c_';
12. Select * from Customers where Country like 'Fin_a%';

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=1fc47f43-5844-4759-838d-e159299d0546&noteKey=79cd69489f6a16a1&sn=https%3… 1/1
2/8/23, 12:25 PM SQL for Beginners - Part 15 - Aliases for Table Column Names (AS Keyword)

Save Copy to Evernote

Last updated: Apr 23, 2020

SQL for Beginners - Part 15 - Aliases for


Table Column Names (AS Keyword)
SQL for Beginners - Aliases for Table Column Names (As Keyword)

1. While the records are retrieved these alias names provided for Column names will be
displayed temporary in place of Original Column names
2. Practical Demonstration:
1. Select * from Categories;
2. Select CategoryID,CategoryName from Categories;
3. Select CategoryID as ID,CategoryName as Name from Categories;
4. As is optional - Select CategoryID ID,CategoryName Name from Categories;
5. Select CategoryID as [Category ID],CategoryName as [Category Name] from
Categories;

Regards,
Arun Motoori

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=b8f9b7f5-32de-4509-b4e4-b41c446f4b42&noteKey=f463de0a3e25264b&sn=https%3… 1/1
2/8/23, 12:26 PM SQL for Beginners - Part 16 - Limit Keyword

Save Copy to Evernote

Last updated: Apr 24, 2020

SQL for Beginners - Part 16 - Limit


Keyword
SQL for Beginners - Limit Keyword

1. When a Table has 1000's of records, the Application will slow down when trying to display
them.
2. Using Limit keyword we can decide how many records needs to be displayed on the page
irrespective of number of records available, there by improving the performance
3. Practical Demonstration:
1. Select * from Customers;
2. Select * from Customers Limit 3;
3. Select * from Customers where Country='USA';
4. Select * from Customers where Country='USA' Limit 5;
5. Select * from Customers Limit 2,6;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=efc237f7-abc9-46cc-888d-80eaa848efb9&noteKey=997742c273f77ca0&sn=https%3A… 1/1
2/8/23, 12:27 PM SQL for Beginners - Part 17 - Breaking the Lengthy SQL Statement into multiple lines

Save Copy to Evernote

Last updated: Apr 24, 2020

SQL for Beginners - Part 17 - Breaking the


Lengthy SQL Statement into multiple lines
SQL for Beginners - Breaking the Lengthy SQL Statement into multiple lines

1. We can break the lengthy SQL statement into multiple lines for better understanding
2. Practical Demonstration
1. Select * from Customers;
2. Select CustomerID,CustomerName,Country,City from Customers where
Country='France';

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=c964c5e1-4837-482a-b706-b8180cfc86e7&noteKey=7c95aff91834b7f6&sn=https%3… 1/1
2/8/23, 12:29 PM SQL for Beginners - Part 18 - MySQL Built-in Functions

Save Copy to Evernote

Last updated: Apr 24, 2020

SQL for Beginners - Part 18 - MySQL Built-


in Functions
SQL for Beginners - MySQL Built-in Functions

1. Built-in Functions and RDBMS Software


2. There are several Built-in Functions in MySQL using which we can perform different operations
on the different Table data like Text,Number,Date and Time
3. MySQL Built-in Functions can be categorized into:
1. String Functions
2. Numeric Functions
3. Date and Time Functions
4. Aggregate Functions

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=3e60f5dd-d2cd-46ef-85c5-29e71777e25a&noteKey=2de50199ccc5f13e&sn=https%3… 1/1
2/8/23, 12:29 PM SQL for Beginners - Part 19 - upper() MySQL String Function

Save Copy to Evernote

Last updated: Apr 24, 2020

SQL for Beginners - Part 19 - upper()


MySQL String Function
SQL for Beginners - upper() MySQL String Function

1. One of the built-in functions of MySQL


2. Converts the text under the specified Column data to Upper Case
3. Practical Demonstration
1. Select upper('Arun Motoori');
2. Select upper('Arun Motoori') AS FullName;
3. Select * from Customers;
4. Select Country from Customers;
5. Select upper(Country) from Customers;
6. Select upper(Country) AS Country from Customers;
7. Select upper(Country) AS Country,City from Customers;
8. Select upper(Country) AS Country,upper(City) from Customers;
9. Select upper(Country) AS Country,upper(City) AS City from Customers;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=22427ad1-a190-406c-8fa4-65ada2d7a12d&noteKey=b0af4717d09a2317&sn=https%… 1/1
2/8/23, 12:30 PM SQL for Beginners - Part 20 - lower() MySQL String Function

Save Copy to Evernote

Last updated: Apr 24, 2020

SQL for Beginners - Part 20 - lower()


MySQL String Function
SQL for Beginners - lower() MySQL String Function

1. One of the built-in functions of MySQL


2. Converts the text under the specified Column data to Lower Case
3. Practical Demonstration
1. Select lower('Arun Motoori');
2. Select lower('Arun Motoori') AS FullName;
3. Select * from Customers;
4. Select Country from Customers;
5. Select lower(Country) from Customers;
6. Select lower(Country) AS Country from Customers;
7. Select lower(Country) AS Country,City from Customers;
8. Select lower(Country) AS Country,lower(City) from Customers;
9. Select lower(Country) AS Country,lower(City) AS City from Customers;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=14ca7694-7053-4c52-9097-06318fb4e1b3&noteKey=aeea57f1b0b68f3d&sn=https%3… 1/1
2/8/23, 12:32 PM SQL for Beginners - Part 21 - length() MySQL String Function

Save Copy to Evernote

Last updated: Apr 24, 2020

SQL for Beginners - Part 21 - length()


MySQL String Function
SQL for Beginners - length() MySQL String Function

1. One of the built-in functions of MySQL


2. Finds the size of the data under the specified Column
3. Practical Demonstration
1. Select 'Arun Motoori';
2. Select length('Arun Motoori');
3. Select length('Arun Motoori') AS GivenNameSize;
4. Select * from Customers;
5. Select Country from Customers;
6. Select length(Country) from Customers;
7. Select length(Country) AS SIZE from Customers;
8. Select Country, length(Country) AS SIZE from Customers;
9. Select * from Customers where length(Country)=6;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=642010d5-866b-4d6a-94fd-9a1a1e965d92&noteKey=be7236657c3bc223&sn=https%… 1/1
2/8/23, 12:33 PM SQL for Beginners - Part 22 - instr() MySQL String Function

Save Copy to Evernote

Last updated: Apr 24, 2020

SQL for Beginners - Part 22 - instr()


MySQL String Function
SQL for Beginners - instr() MySQL String Function

1. One of the built-in functions of MySQL


2. Finds the position of the given text in the data of the specified Column
3. Practical Demonstration
1. Select 'Arun Motoori';
2. Select instr('Arun Motoori','n');
3. Select instr('Arun Motoori','n') AS Position;
4. Select instr('Arun Motoori','ri') AS Position;
5. Select * from Customers;
6. Select Country from Customers;
7. Select instr(Country,'e') from Customers;
8. Select instr(Country,'e') AS Position from Customers;
9. Select Country, instr(Country,'e') AS Position from Customers;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=3513365a-542a-4fdd-814d-517d4ed63d44&noteKey=1956e3066a526fde&sn=https%… 1/1
2/8/23, 12:36 PM SQL for Beginners - Part 23 - substr() MySQL String Function

Save Copy to Evernote

Last updated: Apr 24, 2020

SQL for Beginners - Part 23 - substr()


MySQL String Function
SQL for Beginners - substr() MySQL String Function

1. One of the built-in functions of MySQL


2. Retrieves a portion of text from the data of the specified column
3. Practical Demonstration
1. Select 'Arun';
2. Select substr('Arun',2,3);
3. Select substr('Arun',2,3) AS Portion;
4. Select substr('Arun',-3,2);
5. Select substr('Arun',-3,2) As Portion;
6. Select * from Customers;
7. Select Country from Customers;
8. Select substr(Country,2,4) from Customers;
9. Select substr(Country,2,4) AS CountryPortion from Customers;
10. Select Country, substr(Country,2,4) AS CountryPortion from Customers;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=a4368566-bbb3-4323-80d6-caac0d4c613b&noteKey=6387c9818a71f0ac&sn=https%… 1/1
2/8/23, 12:36 PM SQL for Beginners - Part 24 - concat() MySQL String Function

Save Copy to Evernote

Last updated: Apr 24, 2020

SQL for Beginners - Part 24 - concat()


MySQL String Function
SQL for Beginners - concat() MySQL String Function

1. One of the built-in functions of MySQL


2. Adds Two or More Table Column data together
3. Practical Demonstration
1. Select 'Arun';
2. Select concat('Arun',' ','Motoori');
3. Select concat('Arun',' ','Motoori') AS FullName;
4. Select * from Employees;
5. Select Concat(FirstName,' ',LastName) from Employees;
6. Select Concat(FirstName,' ',LastName) AS FullName from Employees;
7. Select FirstName,LastName,Concat(FirstName,' ',LastName) AS FullName from
Employees;
8. Select Concat('My full name is',' ',FirstName,' ',LastName) AS FullName from
Employees;

Regards,
Arun Motoori

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=b3761336-924e-4ac6-8946-6b9e76deb9ef&noteKey=7a28502e434f2707&sn=https%… 1/1
2/8/23, 12:37 PM SQL for Beginners - Part 25 - trim() MySQL String Function

Save Copy to Evernote

Last updated: Apr 24, 2020

SQL for Beginners - Part 25 - trim()


MySQL String Function
SQL for Beginners - trim() MySQL String Function

1. One of the built-in functions of MySQL


2. Removes the leading and trailing spaces of the Column data
3. Practical Demonstration
1. Select 'Arun';
2. Select ' Arun ';
3. Select length(' Arun ');
4. Select length(trim(' Arun '));
5. Select trim(ColumnName) from TableName;
4. Other MySQL String Category functions

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=8f45d8f0-3143-4b13-a869-22729b36d151&noteKey=0e44fee044c7f91a&sn=https%3… 1/1
2/8/23, 12:38 PM SQL for Beginners - Part 26 - abs() MySQL Numeric Function

Save Copy to Evernote

Last updated: Apr 25, 2020

SQL for Beginners - Part 26 - abs() MySQL


Numeric Function
SQL for Beginners - abs() MySQL Numeric Function

1. One of the built-in functions of MySQL


2. Returns the positive values irrespective of the given positive or negative number data in the
specified column
3. Practical Demonstration
1. Select 9;
2. Select -9;
3. Select abs(9);
4. Select abs(-9);
5. Inserting a new record into Products table and applying abs on price

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=24a2c092-ec32-4bd6-bd03-01fd30c5e5bd&noteKey=357d96b0e516c95b&sn=https%… 1/1
2/8/23, 12:39 PM SQL for Beginners - Part 27 - mod() MySQL Numeric Function

Save Copy to Evernote

Last updated: Apr 25, 2020

SQL for Beginners - Part 27 - mod()


MySQL Numeric Function
SQL for Beginners - mod() MySQL Numeric Function

1. One of the built-in functions of MySQL


2. Returns the reminder value of the numeric data of the specified column
3. Practical Demonstration
1. Select 9;
2. Select mod(9,4);
3. Select * from OrderDetails;
4. Select Quantity,mod(Quantity,3) from OrderDetails;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=30eab84f-6cf7-46ec-a9da-8ef4da13286e&noteKey=4dbbf91df3dac566&sn=https%3A… 1/1
2/8/23, 12:39 PM SQL for Beginners - Part 28 - greatest() and least() MySQL Numeric Functions

Save Copy to Evernote

Last updated: Apr 25, 2020

SQL for Beginners - Part 28 - greatest()


and least() MySQL Numeric Functions
SQL for Beginners - greatest() and least() MySQL Numeric Function

1. One of the built-in functions of MySQL


2. Returns the greatest and least values of the given numeric values
3. Practical Demonstration
1. Select greatest(88,64,123,97,3,100);
2. Select least(88,64,123,97,3,100);
3. Select greatest('Arun','Varun','Tharun');
4. Select least('Arun','Varun','Tharun');

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=e3e9e6d5-b51b-44fa-9c3a-992d56989fe8&noteKey=889831d0346855c2&sn=https%… 1/1
2/8/23, 12:41 PM SQL for Beginners - Part 29 - truncate() MySQL Numeric Function

Save Copy to Evernote

Last updated: Apr 25, 2020

SQL for Beginners - Part 29 - truncate()


MySQL Numeric Function
SQL for Beginners - truncate() MySQL Numeric Function

1. Built-in function of MySQL


2. truncate() - Returns the numerical values with the allowed number of digits after decimal
point
3. Practical Demonstration
1. Select truncate(123.4567,2);
2. Select truncate(123.4567,3);
3. Select truncate(123.4567,6);
4. Select truncate(123.4567,0);
5. Select truncate(123.4567,-2);
6. SELECT truncate(Price,5) FROM Products;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=03544e49-5249-47a3-9afd-c829920a4844&noteKey=261f9d9f9e3a2a13&sn=https%3… 1/1
2/8/23, 12:43 PM SQL for Beginners - Part 30 - power() and sqrt() MySQL Numeric Functions

Save Copy to Evernote

Last updated: Apr 25, 2020

SQL for Beginners - Part 30 - power() and


sqrt() MySQL Numeric Functions
SQL for Beginners - power() and sqrt() MySQL Numeric Functions

1. Practical Demonstration
1. Select power(3,4);
2. Select sqrt(2);
2. Many other MySQL Numeric Functions

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=9177d32f-50a9-42ff-824a-f2188eec4816&noteKey=8c5497e267673460&sn=https%3… 1/1
2/8/23, 12:44 PM SQL for Beginners - Part 31 - current_date(), curdate(), current_time(), curtime(), now() and sysdate() MySQL Date Time Fun…

Save Copy to Evernote

Last updated: Apr 25, 2020

SQL for Beginners - Part 31 -


current_date(), curdate(), current_time(),
curtime(), now() and sysdate() MySQL
Date Time Functions
SQL for Beginners - current_date(), curdate(), current_time(), curtime(), now() and sysdate()
MySQL Date Time Functions

1. Practical Demonstration
1. Select current_date();
2. Select curdate();
3. Select current_time();
4. Select curtime();
5. select now();
6. select sysdate();

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=3beae38f-ed43-4247-8f9e-b26053d481f4&noteKey=5ca635b2d77b04c6&sn=https%3… 1/1
2/8/23, 12:44 PM SQL for Beginners - Part 32 - year(),month(),day,monthname(),dayname() MySQL Date Time Functions

Save Copy to Evernote

Last updated: Apr 25, 2020

SQL for Beginners - Part 32 -


year(),month(),day,monthname(),dayname()
MySQL Date Time Functions
SQL for Beginners - year(),month(),day(),monthname(),dayname() MySQL Date Time
Functions

1. Practical Demonstration
1. Select year('2020-04-25');
2. Select month('2020-04-25');
3. Select day('2020-04-25');
4. Select monthname('2020-04-25');
5. Select dayname('2020-04-25');
6. SELECT * FROM Orders where month(OrderDate)=4;
7. SELECT * FROM Orders where monthname(OrderDate)='May';
2. Many more Date and Time functions

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=2ddfabfa-8220-4cd0-9c4d-2ae76be88339&noteKey=1c8f915aa9c132c9&sn=https%3… 1/1
2/8/23, 12:45 PM SQL for Beginners - Part 33 - avg(), max(), min(), count() and sum() MySQL Aggregate Functions

Save Copy to Evernote

Last updated: Aug 18, 2021

SQL for Beginners - Part 33 - avg(), max(),


min(), count() and sum() MySQL
Aggregate Functions
SQL for Beginners - avg(), max(), min(), count() and sum() MySQL Aggregate Functions

1. Practical Demonstration
1. Select avg(price) from Products;
2. Select min(price) from Products;
3. Select max(price) from Products;
4. Select count(*) from Products;
5. Select sum(price) from Products;
2. Many more Aggregate functions

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=1692d655-b964-4e22-81a3-430966a8a85d&noteKey=f796b4539036f5bb&sn=https%… 1/1
2/8/23, 12:45 PM SQL for Beginners - Part 34 - Arithmetic Operators

Save Copy to Evernote

Last updated: Aug 18, 2021

SQL for Beginners - Part 34 - Arithmetic


Operators
SQL for Beginners - Arithmetic Operators

1. The below are the different Arithmetic Operators we can use in the SQL Statements:
1. Addition (+)
2. Subtraction (-)
3. Multiplication (*)
4. Division (/)
5. Modulus (%)
2. Practical Demonstration:
1. Select 5+4;
2. Select 5-4;
3. Select 5*4;
4. Select 5/4;
5. Select 5%4;
6. Select Price, Price+10 from Products;
7. Select Price, Price - 10 from Products;
8. Select Price, Price * 10 from Products;
9. Select Price, Price / 10 from Products;
10. Select Price, Price % 10 from Products;

Regards,
Arun Motoori
QAFox.co

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=8ca00980-3b6f-4ffe-8a93-731b24cd17ac&noteKey=34b03de5c2c1c09e&sn=https%3… 1/1
2/8/23, 12:46 PM SQL for Beginners - Part 35 - Installing MySQL Server and Workbench Client for Practising SQL

Save Copy to Evernote

Last updated: May 13, 2022

SQL for Beginners - Part 35 - Installing


MySQL Server and Workbench Client for
Practising SQL
SQL for Beginners - Installing MySQL Server and Workbench Client for Practicing SQL

1. Database Components
1. Client - Runs the SQL queries and communicates with the Server
1. Generally installed in the Local machines
2. Server - Stores the Data into DB
1. Generally installed in Remote Server Machine
2. So far we have practiced SQL statements on the DB hosted by W3Schools
3. Now, lets install our own DB in our machine for practicing SQL from Scratch
4. There are several RDBMS Software available in the market and MySQL is an open source and
available for free of cost.
5. Installing MySQL RDBMS Software, will install both Client and Server
6. The below are the steps for installing MySQL Server and Workbench Client Software:
1. Installing MySQL on Windows
1. Google Search for 'download mysql on windows'
2. Click on this link 'https://dev.mysql.com/downloads/mysql/" from the search
results
3. Click on 'Go to Downloader Page'
4. Select to download the 'mysql-installer-community-Version.msi'
5. Login or Register to Download
6. Click on 'Download Now' button
7. Click on 'Next' when the 'Custom' option is selected
8. Move MySQL Server and MySQL Workbench (From Available products to
Products to be installed)
9. Click on 'Next' until you reach 'Accounts and Roles' screen
10. Give root and root as password and repeat password
11. Click on 'Add User' button
12. Give admin and admin as username and password
13. Click 'ok' and click on 'Next' button
14. Click on 'Next' button until you see 'Execute' button
15. Click on 'Execute' button
16. Click on 'Finish' button
17. Click on 'Next' and 'Finish' buttons until it asks for password
18. Click on 'Next' and 'Finish' and observe that the MySQL Workbench will open
2. Using GUI version of Client - MySQL Workbench
1 Search for Workbench in indo s and open the Soft are
https://www.evernote.com/shard/s433/client/snv?noteGuid=252801b7-2afb-4602-9c7a-d3da7ffad12f&noteKey=4dc4bebc1ffb41fa&sn=https%3A… 1/2
2/8/23, 12:46 PM SQL for Beginners - Part 35 - Installing MySQL Server and Workbench Client for Practising SQL
1. Search for Workbench in windows and open the Software
2. Select Database
Terms > ManagePrivacy
of Service Connections
Policy Report SpamSave Copy to Evernote
3. Select Local Instance and change the name to your desired name say
'MySQL_Server', test and close
4. Select Database > Connect to Database
5. Click on 'Ok'
6. Click on 'Schemas' tab in the displayed window and observe that it will show
you all the databases already created
7. We can expand these Databases and see what is inside
8. In order to see the data inside any Table, right click on the table and select

https://www.evernote.com/shard/s433/client/snv?noteGuid=252801b7-2afb-4602-9c7a-d3da7ffad12f&noteKey=4dc4bebc1ffb41fa&sn=https%3A… 2/2
2/8/23, 12:47 PM SQL for Beginners - Part 36 - Creating, Deleting, viewing and using Databases

Save Copy to Evernote

Last updated: Sep 27, 2022

SQL for Beginners - Part 36 - Creating,


Deleting, viewing and using Databases
SQL for Beginners - Creating,Deleting,viewing and using Databases

1. Practical Demonstration
1. Show Databases;
2. Create Database TestDB;
3. Refresh to see the Database Reflected
4. Observe that the DB will be created without any below objects:
1. Tables
2. Views
3. Stored Procedures
4. etc.
5. Drop Database TestDB;
6. Refresh to see the Database deleted
7. Create Database QAFox
8. Select * from actor;
9. Select * from sakila.actor;
10. Use sakila;
11. Select * from actor;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=93fe6c0a-5f43-45a2-a953-d1666bb5ac0d&noteKey=1c8d74a33c0b5e56&sn=https%3… 1/1
2/8/23, 12:47 PM SQL for Beginners - Part 37 - Creating,Viewing, Describing and Deleting Tables

Save Copy to Evernote

Last updated: Sep 27, 2022

SQL for Beginners - Part 37 -


Creating,Viewing, Describing and Deleting
Tables
SQL for Beginners - Creating, Viewing, Describing and Deleting Tables

1. Table is an object of a Database


2. Practical Demonstration
1. use world;
2. show tables;
3. use QAFox;
4. Create table Employees(id int,name varchar(15),experience int);
5. Describe Employees;
6. Select * from employees;
7. Create table Emp as Select id,name from Employees;
8. drop table Emp;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=30892776-e40b-4e53-89d1-fd65341ca40a&noteKey=4dd378756e7c39c3&sn=https%… 1/1
2/8/23, 12:48 PM SQL for Beginners - Part 38 - Insert Into Statements (For inserting data into Tables)

Save Copy to Evernote

Last updated: Sep 27, 2022

SQL for Beginners - Part 38 - Insert Into


Statements (For inserting data into Tables)
SQL for Beginners - Insert Into Statements (For inserting data into Tables)

1. Practical Demonstration
1. use qafox;
2. show tables;
3. Select * from employees;
4. Describe employees;
5. insert into employees values(1,'Arun',12);
6. Select * from employees;
7. insert into employees values(2,'Varun',5);
8. Select * from employees;
9. insert into employees values(3,'Tharun',7);
10. Select * from employees;
11. insert into employees values(4,'Alice');
1. Will get an error
12. insert into employees(id,name) values(4,'Alice');
1. Null value will be inserted in place on non-inserted column

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=9a47757d-0c80-4f7f-8ee0-d0d5672babc9&noteKey=ecfd08fe92afa2f5&sn=https%3A… 1/1
2/8/23, 12:48 PM SQL for Beginners - Part 39 - Data Types

Save Copy to Evernote

Last updated: Apr 28, 2020

SQL for Beginners - Part 39 - Data Types


SQL for Beginners - Data Types

1. Every column in a Table has a Name and a data type


2. While creating a table, we have to decide the name and type for each and every column
3. Type of the Column decides the data that is expected in the specified table
4. Different Data Types
1. MySQL allows us to use the below data types (Click here)
1. String Data Types
1. Varchar(Size)
2. Numeric Data Types
1. int
2. double
3. Data and Time Data Types
1. DATE - YYYY-MM-DD
2. Time - hh:mm:ss
3. DateTime - YYYY-MM-DD HH:MM:SS
4. YEAR - YYYY
5. Practical Demonstration:
1. use qafox;
2. create table xyz(a int);
3. Select * from xyz;
4. insert into xyz values(9);
5. Select * from xyz;
6. insert into xyz values('Arun');
7. Select * from xyz;
8. insert into xyz values(1.5);
9. Select * from xyz;
10. drop table xyz;
11. create table xyz(a double);
12. insert into xyz(a double);
13. Select * from xyz;
14. insert into xyz values(9);
15. Select * from xyz;
16. insert into xyz values(9.5);
17. drop table xyz;
18. create table xyz(a varchar(15));
19. Select * from xyz;
20. insert into xyz values('Arun');
21. Select * from xyz;
https://www.evernote.com/shard/s433/client/snv?noteGuid=7f65c5b3-d13c-49e5-8daf-660b4ad49e42&noteKey=40a27fcac7a8e5d7&sn=https%3… 1/2
2/8/23, 12:48 PM SQL for Beginners - Part 39 - Data Types

22. drop table xyz;


Terms
23. create table xyz(aofdate);
Service Privacy Policy Report SpamSave Copy to Evernote
24. Select * from xyz;
25. insert into xyz values('1992-12-03');
26. Select * from xyz;
27. drop table xyz;
28. create table xyz(a time);
29. Select * from xyz;
30. insert into xyz values('11:12:13');
31. Select * from xyz;
32. drop table xyz;
33. create table xyz(a datetime);
34. Select * from xyz;
35. insert into xyz values('1992-12-03 11:12:13');
36. drop table xyz;
37. create table xyz(a year);
38. Select * from xyz;
39. insert into xyz values('1992');
40. drop table xyz;

Regards,
Arun Motoori

https://www.evernote.com/shard/s433/client/snv?noteGuid=7f65c5b3-d13c-49e5-8daf-660b4ad49e42&noteKey=40a27fcac7a8e5d7&sn=https%3… 2/2
2/8/23, 12:48 PM SQL for Beginners - Part 40 - Null Value, Is Null Operator and Is Not Null Operator

Save Copy to Evernote

Last updated: Apr 29, 2020

SQL for Beginners - Part 40 - Null Value, Is


Null Operator and Is Not Null Operator
SQL for Beginners - Null Value, Is Null Operator and Is Not Null Operator

1. Practical Demonstration
1. use qafox;
2. show tables;
3. select * from employees;
4. insert into Employees values(5,'Kiran');
1. Error
5. insert into Employees(id,name) values(5,'Kiran');
6. select * from employees;
7. Select * from employees where experience IS NULL;
8. Select * from employees where experience IS NOT NULL;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=fb38fa2e-84a5-4325-a1a4-b45044b0309d&noteKey=4b733176d711c57f&sn=https%3… 1/1
2/8/23, 12:49 PM SQL for Beginners - Part 41 - Delete Statement (For Deleting the Records from Table)

Save Copy to Evernote

Last updated: Sep 27, 2022

SQL for Beginners - Part 41 - Delete


Statement (For Deleting the Records from
Table)
SQL for Beginners - Delete Statement (For Deleting the Records from Table)

1. Practical Demonstration
1. use qafox;
2. select * from employees;
3. delete from employees where id=5;
4. delete from employees where name='Tharun';
5. delete from employees;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=ef23b69b-64fc-40a0-bd82-dccb9eaa2e7d&noteKey=80269e8f4b758f9c&sn=https%3… 1/1
2/8/23, 12:49 PM SQL for Beginners - Part 42 - Update Statement and Set Keyword (For Updating the Table Records)

Save Copy to Evernote

Last updated: Apr 29, 2020

SQL for Beginners - Part 42 - Update


Statement and Set Keyword (For Updating
the Table Records)
SQL for Beginners - Update Statement and Set Keyword (For Updating the Table Records)

1. Practical Demonstration
1. use qafox;
2. select * from employees;
3. insert into employees values(1,'Arun',12);
4. insert into employees values(2,'Varun',5);
5. insert into employees values(3,'Tharun',7);
6. update employees set name='Kiran' where id=3;
7. update employees set name='Tharun',id=4 where experience=5;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=e9eeffd6-808a-40f9-b39a-fe402bbae68c&noteKey=3adf86403fe3132e&sn=https%3A… 1/1
2/8/23, 12:49 PM SQL for Beginners - Part 43 - Rename statement and To Keyword (For Renaming Table Name)

Save Copy to Evernote

Last updated: Apr 29, 2020

SQL for Beginners - Part 43 - Rename


statement and To Keyword (For Renaming
Table Name)
SQL for Beginners - Rename Statement and To keyword (For Renaming Table Name)

1. Practical Demonstration
1. use qafox;
2. show tables;
3. rename table employees to emp;
4. rename table emp to employees;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=161a432b-bef3-4188-b845-23c2e386a21d&noteKey=54d8e8d4102dd538&sn=https%… 1/1
2/8/23, 12:49 PM SQL for Beginners - Part 44 - Alter Statement, Add, Modify Column, Rename Column and Drop Column Keywords

Save Copy to Evernote

Last updated: Apr 29, 2020

SQL for Beginners - Part 44 - Alter


Statement, Add, Modify Column, Rename
Column and Drop Column Keywords
SQL for Beginners - Alter Statement, Add, Modify Column, Rename Column and Drop
Column Keywords

1. Practical Demonstration
1. use qafox;
2. show tables;
3. describe employees;
4. alter table employees add location varchar(15);
5. describe employees;
6. alter table employees modify column location varchar(20);
7. describe employees;
8. alter table employees rename column location to loc;
9. describe employees;
10. alter table employees drop column loc;
11. describe employees;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=f8d11b25-3c8e-4ad7-bafd-9611aaa2b0bc&noteKey=044f17e424e8668f&sn=https%3… 1/1
2/8/23, 12:50 PM SQL for Beginners - Part 45 - Set Autocommit

Save Copy to Evernote

Last updated: May 1, 2020

SQL for Beginners - Part 45 - Set


Autocommit
SQL for Beginners - Set Autocommit

1. Practical Demonstration
1. use qafox;
2. show tables;
3. Select * from employees;
4. insert into employees values(9,'Dinesh',3);
5. Select * from employees;
6. Restart the workbench client and observe that the inserted data is stored
1. use qafox;
2. Select * from employees;
7. set autocommit=0;
8. insert into employees values(11,'Isha',6);
9. Select * from employees;
10. Restart the workbench client and observe that the inserted data is not stored
1. use qafox;
2. Select * from employees;
11. set autocommit=1;
12. insert into employees values(11,'Isha',6);
13. Select * from employees;
14. Restart the workbench client and observe that the inserted data is stored
1. use qafox;
2. Select * from employees;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=eb6a17ea-71cd-47df-a7e1-b4c660494e74&noteKey=2a6d2ce8cd4afac7&sn=https%3… 1/1
2/8/23, 12:50 PM SQL for Beginners - Part 46 - Commit Statement

Save Copy to Evernote

Last updated: May 1, 2020

SQL for Beginners - Part 46 - Commit


Statement
SQL for Beginners - Commit Statement

1. Practical Demonstration
1. use qafox;
2. show tables;
3. set autocommit=0;
4. Select * from employees;
5. insert into employees values(9,'Dinesh',3);
6. Select * from employees;
7. Restart the workbench client and observe that the inserted data is not permanently
stored
1. use qafox;
2. Select * from employees;
8. insert into employees values(9,'Dinesh',3);
9. commit;
10. Select * from employees;
11. Restart the workbench client and observe that the inserted data is stored permanently
1. use qafox;
2. Select * from employees;
12. set autocommit=1;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=39fcbd23-8991-41e2-841f-7eda3e18078c&noteKey=8012cf1b2f4af150&sn=https%3A… 1/1
2/8/23, 12:50 PM SQL for Beginners - Part 47 - Rollback Statement

Save Copy to Evernote

Last updated: May 13, 2022

SQL for Beginners - Part 47 - Rollback


Statement
SQL for Beginners - Rollback Statement

1. Practical Demonstration
1. use qafox;
2. show tables;
3. set autocommit=0;
4. Select * from employees;
5. delete from employees;
6. Select * from employees;
7. rollback;
8. delete from employees;
9. commit;
10. rollback;
11. set autocommit=1;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=ece0c920-48e3-46c0-9bc8-953c628e44e6&noteKey=ac45ecea68bc0232&sn=https%… 1/1
2/8/23, 12:51 PM SQL for Beginners - Part 48 - Truncate Statement

Save Copy to Evernote

Last updated: May 1, 2020

SQL for Beginners - Part 48 - Truncate


Statement
SQL for Beginners - Truncate Statement

1. Practical Demonstration
1. use qafox;
2. show tables;
3. Select * from employees;
4. insert into employees values(1,'Arun',12);
5. commit;
6. set autocommit=0;
7. delete from employees;
8. rollback;
9. Select * from employees;
10. truncate table employees;
11. rollback;
12. Select * from employees;
13. set autocommit=1;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=0a9a081c-e8e9-4999-af62-cc2cd13f25ee&noteKey=519410e1c6c7e468&sn=https%3… 1/1
2/8/23, 12:51 PM SQL for Beginners - Part 49 - Single Line and Multi-Line Comments

Save Copy to Evernote

Last updated: May 1, 2020

SQL for Beginners - Part 49 - Single Line


and Multi-Line Comments
SQL for Beginners - Single Line and Multi-Line Comments

1. Comments are the Statements which won't be executed like general SQL statements
2. Can be used for any of the below reasons:
1. To explain the underlying statements to make it understandable
2. To hide the statement from execution
3. Types of Comments in SQL
1. Single Line Comments
2. Multi-Line Comments
4. Practical Demonstration
1. -- The below SQL statement is used for selecting the Database for further operations
2. use qafox;
3. /* The below SQL statements are used for finding the list of tables in the above
selected
4. database and to retrieve the records from the specified table */
5. show tables;
6. select * from employees;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=921f4d2a-19bd-4ff6-9631-64c1b4ef3380&noteKey=b1be0a5384992549&sn=https%3… 1/1
2/8/23, 12:51 PM SQL for Beginners - Part 50 - Group By Clause

Save Copy to Evernote

Last updated: Jan 13, 2022

SQL for Beginners - Part 50 - Group By


Clause
SQL for Beginners - Group By Clause

1. Practical Demonstration
1. use world;
2. show tables;
3. select * from country;
4. Select name from country;
5. select count(Name) from country;
6. select count(name) from country group by Continent;
7. select continent,count(name) from country group by Continent;

By,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=cd656490-4664-4cc6-b5c5-c2e6ffdf0a60&noteKey=206f86d9743573ba&sn=https%3… 1/1
2/8/23, 12:51 PM SQL for Beginners - Part 51 - Having Clause

Save Copy to Evernote

Last updated: May 1, 2020

SQL for Beginners - Part 51 - Having


Clause
SQL for Beginners - Having Clause

1. Having Clause is like a Where Clause for Group By Clause


2. In case of providing condition for Group By Clause, we have to use Having Clause
3. Practical Demonstration
1. use world;
2. show tables;
3. select * from Country;
4. select name from country;
5. select count(name) from country;
6. select count(name) from country where surfacearea>100;
7. select continent,count(name) from country group by continent;
8. select continent,count(name) from country group by continent having count(name)
<10;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=259ece99-c4bb-4902-92c7-e693e002aa87&noteKey=fd6a06c730792e8e&sn=https%… 1/1
2/8/23, 12:52 PM SQL for Beginners - Part 52 - Sequence of using where, group by, having and order by clauses

Save Copy to Evernote

Last updated: May 2, 2020

SQL for Beginners - Part 52 - Sequence of


using where, group by, having and order
by clauses
SQL for Beginners - Sequence of using where, group by, having and order by clauses

1. where > group by > having > order by


2. Practical Demonstration
1. use world;
2. select continent,count(name) from country where surfacearea>300 group by continent
having count(name)>20 order by count(name) ASC;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=71016c16-4f04-4e91-8523-4a5349f2d85d&noteKey=ba97f0aa9aaba519&sn=https%3… 1/1
2/8/23, 12:52 PM SQL for Beginners - Part 53 - Set Operators

Save Copy to Evernote

Last updated: May 2, 2020

SQL for Beginners - Part 53 - Set


Operators
SQL for Beginners - Set Operators

1. We can retrieve the data from different tables at a time using the Set Operators
1. Select * from TableOne Set Operator Select * from TableTwo;
2. The below are the different Set Operators
1. Union
2. Union All
3. Intersect
4. Minus

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=b7f193cc-733c-4d3e-8ac9-cedc7c0b0d0c&noteKey=6a1ecabefbc511e5&sn=https%3… 1/1
2/8/23, 12:54 PM SQL for Beginners - Part 54 - Union Operator

Save Copy to Evernote

Last updated: May 22, 2020

SQL for Beginners - Part 54 - Union


Operator
SQL for Beginners - Union Operator

1. Union Operator in one of the Operators in the four Set Operators


2. Purpose of Union Operator
3. Practical Demonstration
1. use qafox;
2. create table empone(id int);
3. insert into empone values(1);
4. insert into empone values(3);
5. insert into empone values(5);
6. select * from empone;
7. create table emptwo(num int);
8. insert into emptwo values(2);
9. insert into emptwo values(3);
10. insert into emptwo values(4);
11. select * from emptwo;
12. select * from empone union select * from emptwo;
13. Demonstrate with the two column table
1. Combination of column records will be considered for comparison and
elimination of duplicates
14. Rules:
1. Select statements of each table must retrieve the same number of columns
2. Columns provided in the select statements should have the similar data type to
work properly
3. The order of the columns provided in the select statements should be same to
work properly

Regards

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=77116281-1cbc-4a3a-919a-6164f0dcecc2&noteKey=cbecfd6217f3f480&sn=https%3A… 1/1
2/8/23, 12:54 PM SQL for Beginners - Part 55 - Union All Operator

Save Copy to Evernote

Last updated: May 2, 2020

SQL for Beginners - Part 55 - Union All


Operator
SQL for Beginners - Union All Operator

1. Union All Operator is one of the Set Operators


2. Unlike Union Operator, Union All won't eliminate the duplicates
3. Practical Demonstration
1. use qafox;
2. create table tone(id int);
3. insert into tone values(1);
4. insert into tone values(3);
5. insert into tone values(5);
6. select * from tone;
7. create table ttwo(num int);
8. insert into ttwo(2);
9. insert into ttwo(3);
10. insert into ttwo(4);
11. select * from ttwo;
12. select id from tone union all select num from ttwo;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=2a58b741-461b-4e34-a1d1-66e507b5a2f2&noteKey=1c478ec62ff59686&sn=https%3… 1/1
2/8/23, 12:55 PM SQL for Beginners - Part 56 - Intersect Operator

Save Copy to Evernote

Last updated: May 2, 2020

SQL for Beginners - Part 56 - Intersect


Operator
SQL for Beginners - Intersect Operator

1. Intersect Operator is one of the Set Operators


2. Intersect Operator will retrieve the common records from the given tables
3. Intersect Operator is not supported by MySQL RDBMS
1. We have to use Oracle SQL RDMBS
2. Google search for 'Try Oracle SQL Online Practice'
4. Practical Demonstration
1. use qafox;
2. create table tone(id int);
3. insert into tone values(1);
4. insert into tone values(3);
5. insert into tone values(5);
6. select * from tone;
7. create table ttwo(num int);
8. insert into ttwo(2);
9. insert into ttwo(3);
10. insert into ttwo(4);
11. select * from ttwo;
12. select id from tone intersect select num from ttwo;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=584c96bb-6e82-4653-b4ad-a01bc4f54dda&noteKey=aedf31eab7c7f671&sn=https%3… 1/1
2/8/23, 12:55 PM SQL for Beginners - Part 57 - Minus Operator

Save Copy to Evernote

Last updated: May 2, 2020

SQL for Beginners - Part 57 - Minus


Operator
SQL for Beginners - Minus Operator

1. Minus Operator is one of the Set Operators


2. Minus Operator will retrieve the records in the first table and that are not available in the
second table
3. Minus Operator is not supported by MySQL RDBMS
1. We have to use Oracle SQL RDMBS
2. Google search for 'Try Oracle SQL Online Practice'
4. Practical Demonstration
1. use qafox;
2. create table tone(id int);
3. insert into tone values(1);
4. insert into tone values(3);
5. insert into tone values(5);
6. select * from tone;
7. create table ttwo(num int);
8. insert into ttwo(2);
9. insert into ttwo(3);
10. insert into ttwo(4);
11. select * from ttwo;
12. select id from tone minus select num from ttwo;
13. select id from two minus select num from tone;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=93ebdd10-2f09-4034-8841-71ac5b7b2e6e&noteKey=96df486bc0b44243&sn=https%… 1/1
2/8/23, 12:55 PM SQL for Beginners - Part 58 - Tables and Aliases

Save Copy to Evernote

Last updated: Aug 20, 2021

SQL for Beginners - Part 58 - Tables and


Aliases
SQL for Beginners - Tables and Aliases

1. Practical Demonstration
1. Select o.id,o.firstname,t.lastname
2. from empdetailsone o,empdetailstwo t
3. where o.id=t.id;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=4e9faf6c-dfa6-4a9d-8394-edc8db92fb95&noteKey=74bb0467410268de&sn=https%3… 1/1
2/8/23, 12:56 PM SQL for Beginners - Part 59 - Joins (Inner Join, Left Join, Right Join, Full Join and Self Join)

Save Copy to Evernote

Last updated: Aug 20, 2021

SQL for Beginners - Part 59 - Joins (Inner


Join, Left Join, Right Join, Full Join and Self
Join)
SQL for Beginners - Joins (Inner Join, Left Join, Right Join, Full Join and Self Join)

1. The purpose of the Joins is to Join two tables while retrieving the records using the common
column
2. The two tables should have a common column
3. Types of Joins:
1. Inner Join (Equi Join or Simple Join)
2. Left Join (Left Outer Join)
3. Right Join (Right Outer Join)
4. Full Join (Full Outer Join) - Not supported by MySQL
5. Self Join
4. Practical Demonstrations

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=fe3281a0-5ce5-4aba-8171-d4b498cea381&noteKey=dbc9939bc21866b8&sn=https%… 1/1
2/8/23, 12:57 PM SQL for Beginners - Part 60 - Sub Query (Explaining Single Row Sub Query by solving different SQL problems)

Save Copy to Evernote

Last updated: May 4, 2020

SQL for Beginners - Part 60 - Sub Query


(Explaining Single Row Sub Query by
solving different SQL problems)
SQL for Beginners - Sub Query (Explaining Single Row Sub Query by solving different SQL
problems)

1. Sub Query is a Query inside another Query


2. Understanding Sub Query:
1. Outer Query
2. Inner Query (Sub Query)
3. Based on the number of records retrieved by the Inner Query, we can categorize Sub
Queries into:
1. Single Row Sub Query
2. Multi Row Sub Query
4. Practical Demonstrations:
1. Single Row Sub Query
1. Find all the Customers in the Customers table who are from the same city of
'Hari Kumar'
1. First we have to find the city of Hari Kumar in the Customer Table
1. Select City from Customers where ContactName='Hari Kumar';
2. We have to make the above query a sub-query (Inner Query) in the
where clause of Outer Query
1. Select * from Customers where City=(Select City from Customers
where ContactName='Hari Kumar');
2. Finding the second maximum price of the Products
1. Select Price from Products;
2. Select max(price) from Products;
3. Select Price from Products < (Select max(price) from Products);
4. Select Price from Products where Price < (Select max(price) from
Products);
5. Select max(Price) from Products where Price < (Select max(price) from
Products);
3. Finding the third maximum price of the Products
1. Select max(Price) from Products where Price < (Select max(Price) from
Products where Price < (Select max(price) from Products));
4. Display the products sold at the least price
1. Select min(price) from Products;
2. Select ProductName from Products where price = (Select min(price) from
Products);
https://www.evernote.com/shard/s433/client/snv?noteGuid=0a3f9988-7de9-4ca8-b392-93484c7be4a1&noteKey=9b97a7e80ac8de3f&sn=https%… 1/2
2/8/23, 12:57 PM SQL for Beginners - Part 60 - Sub Query (Explaining Single Row Sub Query by solving different SQL problems)

Terms of Service Privacy Policy Report SpamSave Copy to Evernote

https://www.evernote.com/shard/s433/client/snv?noteGuid=0a3f9988-7de9-4ca8-b392-93484c7be4a1&noteKey=9b97a7e80ac8de3f&sn=https%… 2/2
2/8/23, 12:58 PM SQL for Beginners - Part 61 - In Operator

Save Copy to Evernote

Last updated: May 4, 2020

SQL for Beginners - Part 61 - In Operator


SQL for Beginners - In Operator

1. Allows us to provide multiple values in the Where Clause Condition


2. Practical Demonstration
1. Select * from Customers where Country='USA';
2. Select * from Customers where Country In ('USA','UK','Italy','France','Spain');
3. SELECT * FROM Customers where Country Not In ('USA','UK','Italy','France','Spain');
3. In Operator is mainly used with Multi Row Sub Queries

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=237b6be4-5453-499a-bdc2-5467efd5d77e&noteKey=6d0445c4a183c3c2&sn=https%… 1/1
2/8/23, 12:58 PM SQL for Beginners - Part 62 - Using In Operator with Multi Row Sub Query

Save Copy to Evernote

Last updated: May 5, 2020

SQL for Beginners - Part 62 - Using In


Operator with Multi Row Sub Query
SQL for Beginners - Using In Operator with Multi Row Sub Query

1. Multi Row Sub Query is a Query inside another Query and it provides multi records as input
to the outer query
2. Different Operators which can be used in Multi Row Sub Query
1. in
2. any
3. all
4. exists
3. Practical Demonstration
1. Find the different Products from the specified Categories
1. Select * from Products where CategoryID in (Select CategoryID from Categories
where CategoryName like 'c%');

Regards,
Arun Motoori

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=ac6d3579-0a60-4e9d-abb6-3716fdcef1a8&noteKey=107e2d6e73a7c89e&sn=https%… 1/1
2/8/23, 12:58 PM SQL for Beginners - Part 63 - Using Any Operator in Multi Row Sub Query

Save Copy to Evernote

Last updated: May 5, 2020

SQL for Beginners - Part 63 - Using Any


Operator in Multi Row Sub Query
SQL for Beginners - Using Any Operator with Multi Row Sub Query

1. Multi Row Sub Query is a Query inside another Query and it provides multi records as input
to the outer query
2. Different Operators which can be used in Multi Row Sub Query
1. in
2. any
3. all
3. Practical Demonstration
1. Select * from Products where ProductID < any (SELECT ProductID FROM OrderDetails
where Quantity=1);

Regards,
Arun Motoori

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=8b566e8f-0217-4e8c-9b1d-f56a3986f5f6&noteKey=9fd93cfeffff9d19&sn=https%3A%2… 1/1
2/8/23, 12:59 PM SQL for Beginners - Part 64 - Using All Operator in Multi Row Sub Query

Save Copy to Evernote

Last updated: May 5, 2020

SQL for Beginners - Part 64 - Using All


Operator in Multi Row Sub Query
SQL for Beginners - Using All Operator with Multi Row Sub Query

1. Practical Demonstration
1. Select * from Products where ProductID < all (SELECT ProductID FROM OrderDetails
where Quantity=1);

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=2ae38846-d16a-442e-8438-74c97a84bafc&noteKey=1ec8d96e2c8414b8&sn=https%… 1/1
2/8/23, 12:59 PM SQL for Beginners - Part 65 - Exists Operator

Save Copy to Evernote

Last updated: May 5, 2020

SQL for Beginners - Part 65 - Exists


Operator
SQL for Beginners - Exists Operator

1. Exists Operator is used with Sub Queries


2. Practical Demonstration
1. Select * from Orders where exists (Select * from Customers where CustomerID>91);

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=4f946882-cddb-4cbb-81d4-58801e4d0e3d&noteKey=a963bd206841796f&sn=https%… 1/1
2/8/23, 1:00 PM SQL for Beginners - Part 66 - Using Sub Queries for retrieving the records from multiple tables

Save Copy to Evernote

Last updated: May 5, 2020

SQL for Beginners - Part 66 - Using Sub


Queries for retrieving the records from
multiple tables
SQL for Beginners - Using Sub Queries for retrieving the records from multiple tables

1. Practical Demonstration
1. Select city,(Select country from country where country.country_id=city.country_id)
country from City;
1. Will get the records
2. Select country,(Select city from city where country.country_id=city.country_id) city
from Country;
1. Will get an error
2. Sub Query resulting in multiple records, will give an error

Regards,
Arun Motoori

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=a8b927af-4ab0-4119-a293-e089a9b89e45&noteKey=6c7236d0f637e966&sn=https%… 1/1
2/8/23, 1:00 PM SQL for Beginners - Part 67 - Using Multiple Sub Queries in a single SQL statement

Save Copy to Evernote

Last updated: Aug 20, 2021

SQL for Beginners - Part 67 - Using


Multiple Sub Queries in a single SQL
statement
SQL for Beginners - Using Multiple Sub Queries in a single SQL statement

1. Practical Demonstration
1. List out the films having the length less than the maximum length and having the
rental duration equal to the minimum rental duration
1. Finding the maximum length of the films
1. select max(length) from film;
2. Finding the minimum rental duration of the films
1. select min(rental_duration) from film;
3. Now list out the films having the length less than the maximum length
and having the rental duration equal to the minimum rental duration
1. select title,length,rental_duration from film
2. where length < (select max(length) from film)
3. and rental_duration = (select min(rental_duration) from film);

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=38e5c7cf-681b-4330-8af0-120da2b4a7bf&noteKey=5616ce410f381f79&sn=https%3A… 1/1
2/8/23, 1:01 PM SQL for Beginners - Part 68 - Integrity Constraints

Save Copy to Evernote

Last updated: May 6, 2020

SQL for Beginners - Part 68 - Integrity


Constraints
SQL for Beginners - Integrity Constraints

1. Conditions we can apply on the Table Column Data


2. We can apply this Integrity Constraints to the Table Columns, while using Create and Alter
SQL statements
3. Types of Integrity Constraints
1. Not Null
2. Unique
3. Primary Key
4. Foreign Key
5. Check
6. Default
4. Example: create table employees(sno int not null, name varchar(10), experience int);

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=f8cb8ab6-46db-49ac-809d-061e592fe73e&noteKey=3c2a2f46b37d62a5&sn=https%3… 1/1
2/8/23, 1:02 PM SQL for Beginners - Part 69 - Not Null (Integrity Constraint)

Save Copy to Evernote

Last updated: May 6, 2020

SQL for Beginners - Part 69 - Not Null


(Integrity Constraint)
SQL for Beginners - Not Null (Integrity Constraint)

1. Not Null is an Integrity Constraint


2. Not Null when specified to a column will not allow the column to allow null values
3. Practical Demonstration
1. create table emp(id int not null,name varchar(15),experience int);

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=95a4ea39-211b-4fc9-a15a-8c8e4bdfd0bd&noteKey=d71af1100f8471de&sn=https%3… 1/1
2/8/23, 1:02 PM SQL for Beginners - Part 70 - Unique (Integrity Constraint)

Save Copy to Evernote

Last updated: May 6, 2020

SQL for Beginners - Part 70 - Unique


(Integrity Constraint)
SQL for Beginners - Unique (Integrity Constraint)

1. Unique is an Integrity Constraint


2. Unique when specified to a column will not allow the column to allow duplicate values
3. Practical Demonstration
1. create table emp(id int unique,name varchar(15),experience int);
4. Unique values can be used at Table and Column levels
1. create table emp(id int unique,name varchar(15),experience int);
2. create table emp(id int,name varchar(15),experience int,unique(id,name));

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=2849f239-e4c4-4c79-ac17-a733d87c6c56&noteKey=457e66fb40aa654f&sn=https%3… 1/1
2/8/23, 1:02 PM SQL for Beginners - Part 71 - Primary Key (Integrity Constraint)

Save Copy to Evernote

Last updated: May 7, 2020

SQL for Beginners - Part 71 - Primary Key


(Integrity Constraint)
SQL for Beginners - Primary Key (Integrity Constraint)

1. Primary Key is an Integrity Constraint


2. Primary Key = Not Null + Unique;
3. Practical Demonstration
1. create table emp(id int not null unique,name varchar(15),experience int);
4. Primary Key at Column Level and Table Level

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=44af19bb-de1e-4255-baee-9531b32dc1bc&noteKey=b201fc764e8ac893&sn=https%3… 1/1
2/8/23, 1:03 PM SQL for Beginners - Part 72 - Foreign Key (Integrity Constraint)

Save Copy to Evernote

Last updated: Aug 20, 2021

SQL for Beginners - Part 72 - Foreign Key


(Integrity Constraint)
SQL for Beginners - Foreign Key (Integrity Constraint)

1. Foreign Key is one of the Integrity Constraints


2. We need to create two tables having a common column
1. Parent Table (Reference Table)
1. Should have a Primary Key (Candidate Key) specified for Common Column
2. Child Table
1. Should have the Foreign Key Specified for Common Column
3. Child Table Depends on the Parent Table
1. Inserting the records in Child table should match with the Parent Table common
column
2. Deleting the records in Parent Table is not possible if there are dependent records in
the Child Table
4. On Delete Cascade
5. Practical Demonstration
1. create table employee(id int primary key,name varchar(15),experience int);
2. create table salary(id int,sal int,foreign key(id) references employee(id));
3. create table salary(id int,sal int,foreign key(id) references employee(id) on delete
cascade);

Regards,

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=a2d0c49c-b2b6-4503-a246-3e318be658c3&noteKey=7b6318eabdda714e&sn=https… 1/1
2/8/23, 1:03 PM SQL for Beginners - Part 73 - Check (Integrity Constraint)

Save Copy to Evernote

Last updated: Jan 13, 2022

SQL for Beginners - Part 73 - Check


(Integrity Constraint)
SQL for Beginners - Check (Integrity Constraint)

1. Check is an Integrity Constraint


2. Practical Demonstration
1. create table empone(id int,name varchar(15),experience int check(experience >5));
2. create table emptwo(id int,location varchar(15) check(location in ('India','USA','UK')));

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=9ecb10c8-9650-46d9-a52e-54369566d426&noteKey=dd5469d6fd5dc237&sn=https%… 1/1
2/8/23, 1:03 PM SQL for Beginners - Part 74 - Default (Integrity Constraint)

Save Copy to Evernote

Last updated: May 8, 2020

SQL for Beginners - Part 74 - Default


(Integrity Constraint)
SQL for Beginners - Default (Integrity Constraint)

1. Default is an Integrity Constraint


2. Practical Demonstration
1. create table empone(id int, experience int default 5);
2. create table emptwo(id int,location varchar(15) default 'India');
3. create table empthree(id int,DateOfJoining date default '2007-08-15');

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=f5e5476d-3289-472e-af71-03ca8a0d3b4e&noteKey=fdb3a6d65bcbc6f8&sn=https%3… 1/1
2/8/23, 1:04 PM SQL for Beginners - Part 75 - auto_increment

Save Copy to Evernote

Last updated: May 8, 2020

SQL for Beginners - Part 75 -


auto_increment
SQL for Beginners - auto_increment

1. auto_increment will increment the values of the Table columns by one, if we are not inserting
any data
2. Practical Demonstration
1. create table empone(id int primary key auto_increment,name varchar(15));
1. insert into empone values(5,'Arun');
2. insert into empone(name) values('Varun');
3. insert into empone values(9,'Tharun');
4. insert into empone(name) values('Dinesh');
2. create table emptwo(id int primary key auto_increment,name varchar(15));
1. insert into empone(name) values('Arun');
2. insert into empone(name) values('Varun');
3. create table emptwo(id int primary key auto_increment,name varchar(15))
auto_increment=100;
1. insert into empone(name) values('Arun');
2. insert into empone(name) values('Varun');

Regards,
Arun Motoori

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=2286827e-d965-4218-a046-cdd25bb873ea&noteKey=6fdca7aa3ff0be3b&sn=https%3… 1/1
2/8/23, 1:05 PM SQL for Beginners - Part 76 - Insert Into

Save Copy to Evernote

Last updated: May 8, 2020

SQL for Beginners - Part 76 - Insert Into


SQL for Beginners - Insert Into

1. Insert Into Statement is used for copying the records from a table into another table having
same column names and data types
2. Practical Demonstration
1. insert into newcity Select * from city;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=06490d9b-2dc9-4d46-9a9f-8c69c9b2691b&noteKey=2c9d13f9dad34131&sn=https%3… 1/1
2/8/23, 1:05 PM SQL for Beginners - Part 77 - AS Keyword

Save Copy to Evernote

Last updated: May 9, 2020

SQL for Beginners - Part 77 - AS Keyword


SQL for Beginners - AS Keyword

1. AS Keyword is used to create a new table with the records of an existing table
2. Practical Demonstration
1. Create Table NewPlace AS Select * from Place;
2. Create Table PlaceTwo AS Select name,district from Place;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=a5911f45-b93b-472d-8e99-101abc77f030&noteKey=216f9287688b4e14&sn=https%3… 1/1
2/8/23, 1:05 PM SQL for Beginners - Part 78 - IfNull() function

Save Copy to Evernote

Last updated: May 9, 2020

SQL for Beginners - Part 78 - IfNull()


function
SQL for Beginners - IfNull() function

1. IfNull() function is used to provide an alternate value when the column value is null
2. Practical Demonstration
1. create table empone(id int,salary int);
2. Select (ifnull(salary,0)+100000) newsalary from empone;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=5a6f1405-864d-4fff-84dc-e93fa6e979b3&noteKey=a0c078443eb7eee0&sn=https%3A… 1/1
2/8/23, 1:06 PM SQL for Beginners - Part 79 - Case, When,Then and End Keywords

Save Copy to Evernote

Last updated: May 9, 2020

SQL for Beginners - Part 79 - Case,


When,Then and End Keywords
SQL for Beginners - Case,When,Then and End Keywords

1. Case,When,Then and End Keywords can be used in Select statements


2. Practical Demonstration
1. Example One:
1. Select ProductName,Price,
2. Case
1. When Price > 10 Then 'The Price is greater than 10'
2. When Price = 10 Then 'The Price is equal to 10'
3. When Price < 10 Then 'The Price is less than 10'
3. End As PriceDetails,
4. Unit
5. from Products;
2. Example Two:
1. SELECT * FROM Customers
2. where City =
3. (Case
1. when Country In ('USA','UK') Then City
2. When Country Not In ('USA','UK') Then 'Berlin'
4. End);
3. Example Three
1. Select * from Customers
2. Order By
3. (Case
1. When Country In ('USA','UK') Then Country
2. When Country Not In ('USA','UK') Then City
4. End);

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=531bbef6-c0f2-4f3f-bdc5-04c412f1c513&noteKey=8e06430e3b4dcb32&sn=https%3A… 1/1
2/8/23, 1:07 PM SQL for Beginners - Part 80 - Delimiter

Save Copy to Evernote

Last updated: May 9, 2020

SQL for Beginners - Part 80 - Delimiter


SQL for Beginners - Delimiter

1. Default Delimiter is ;
2. We can change the delimiter to other symbol
3. Practical Demonstration
1. Select * from city;
2. Delimiter //
3. Select * from city//
4. Different symbols can be used instead of //
5. Delimiters are generally used with Stored Procedures

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=5ef485db-e138-4ce1-9fea-bacec248fd43&noteKey=613b1547cede6fcd&sn=https%3… 1/1
2/8/23, 1:07 PM SQL for Beginners - Part 81 - Delimiter usage in Stored Procedures

Save Copy to Evernote

Last updated: May 9, 2020

SQL for Beginners - Part 81 - Delimiter


usage in Stored Procedures
SQL for Beginners - Delimiter usage in Stored Procedures

1. Store Procedures belong to PL/SQL


2. PL/SQL is a out of topic for this video course and is not required for Testers too.
3. But I am going to explain about Stored Procedures with respect to Delimiter usage
4. Stored Procedures are like functions in programming languages
5. We create stored procedures for executing the repetitive block of SQL statements
6. Practical Demonstration
1. Delimiter //
2. create procedure getAllCities()
3. Begin
1. Select * from City;
4. End //

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=e5c43652-aaca-4f35-bb43-2c88064bc0b1&noteKey=b49ee4d755989335&sn=https%… 1/1
2/8/23, 1:07 PM SQL for Beginners - Part 82 - Views

Save Copy to Evernote

Last updated: May 10, 2020

SQL for Beginners - Part 82 - Views


SQL for Beginners - Views

1. The main purpose of views is to create different varieties of the same table or tables (Virtual
Tables)
2. We can create Views by customizing the same table columns or by selecting the columns
from multiple tables
3. Hide the Database implementation of the actual tables and show the desired virtual views to
the Users
4. Practical Demonstration
1. create table empone(id int,name varchar(15),country varchar(15));
2. insert into empone values (1,'Arun','India');
3. insert into empone values (2,'Varun','UK');
4. insert into empone values (3,'Tharun','Spain');
5. insert into empone values (4,'Dinesh','New Zealand);
6. select * from empone;
7. create table emptwo(id int,experience int);
8. insert into emptwo values(1,12);
9. insert into emptwo values(2,7);
10. select * from emptwo;
11. create view emponeviewa as Select * from empone;
12. create view emponeviewb as Select id,name from empone;
13. create view emponeviewc as Select id,country from empone;
14. create view emponeviewd as Select country,name,id from empone;
15. create view empviewb as Select empone.id,empone.name,emptwo.experience from
empone,emptwo where empone.id=emptwo.id;
5. Performing operators on the Views will effect the original tables and vice versa

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=a544849f-5b78-43dd-8818-09fbb7958757&noteKey=e2e299625c4edd99&sn=https%… 1/1
2/8/23, 1:07 PM SQL for Beginners - Part 83 - Indexes

Save Copy to Evernote

Last updated: May 11, 2020

SQL for Beginners - Part 83 - Indexes


SQL for Beginners - Indexes

1. Indexes when implemented for a table, will increase the performance of the Application by
retrieving the records at faster speed
2. Indexes are like Table of Contents or Index in a Book, which are provided for faster access of
the required topics
3. Indexes should be implemented for retrieval operations
1. Insertions and Updates will slow down if you create indexes
2. Select operations need indexes for speeder retrieval
4. Practical Demonstration
1. use qafox;
2. create table empone(id int,name varchar(15),experience int,country varchar(15));
3. insert into empone values(1,'Arun',12,'India');
4. insert into empone values(2,'Varun',7,'USA');
5. insert into empone values(3,'Tharun',9,'UK');
6. Select * from empone;
7. Select * from empone where country='USA';
8. show indexes from empone;
9. create index empcountry
10. on empone(country);
11. show indexes from empone;
12. drop index empcountry on empone;
13. create table emptwo(id int primary key,name varchar(15));
1. primary index will be automatically created
2. show indexes from emptwo;
14. create table empthree(id int unique,name varchar(15));
1. id index will be automatically created
2. show indexes from empthree;

Regards,
Arun Motoori

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=49c5af0e-205c-47ca-be7b-04c3a210d336&noteKey=cce80e72375284c3&sn=https%… 1/1
2/8/23, 1:08 PM SQL for Beginners - Part 84 - JDBC (Conneting to MySQL Database from Java Programs)

Save Copy to Evernote

Last updated: May 12, 2020

SQL for Beginners - Part 84 - JDBC


(Conneting to MySQL Database from Java
Programs)
SQL for Beginners - JDBC (Connecting to MySQL Database from Java Programs)

1. Basic Java knowledge is required for understanding this session


2. If you don't know Java, then try to understand the concept behind JDBC
3. So far we have used Client Tools like MySQL Workbench for connecting and performing
operations on the Databases in MySQL Server
4. We can also connect to Server and perform Operations on the DB in the Server from Java
Programs
5. JDBC stands for Java Database Base Connectivity
6. How to Connect to MySQL Database from Java Programs?
1. Install the below requirements:
1. Java JDK
2. Eclipse IDE for Java Enterprise Developer
7. Follow the below steps
1. Use MySQL Workbench to connect to MySQL qafox DB and create a table
1. use qafox;
2. create table empone(id int,name varchar(15));
3. insert into empone values(1,'Arun');
4. insert into empone values(2,'Varun');
5. insert into empone values(3,'Tharun');
6. Select * from empone;
2. Create a Maven Project in Eclipse IDE
3. Configure the Project with MySQL Java Connectivity Driver
1. Every DBMS software like MySQL, Oracle has their own drivers
4. Create a new Demo Class
5. Create a Connection
1. Check how do you make a connection to MySQL Server using any Client say
MySQL Workbench
2. Connection connection =
DriverManager.getConnection("jdbc:mysql://localhost:3306/qafox","root","root"
);
3. if(!connection.isClosed()) {
4. System.out.println("Connection is successfull");
5. }
6. Create and Execute the Statement
1 Statement statement = connection createStatement();
https://www.evernote.com/shard/s433/client/snv?noteGuid=f94d3f21-708b-4a5a-b778-6237fd0599a2&noteKey=cf62dbf4e2f3c0af&sn=https%3A… 1/2
2/8/23, 1:08 PM SQL for Beginners - Part 84 - JDBC (Conneting to MySQL Database from Java Programs)
1. Statement statement = connection.createStatement();
2. statement.execute("insert into empone values(4,'Dinesh')");
Terms of Service Privacy Policy Report SpamSave Copy to Evernote
3. Execute the program and check in Workbench to see if the statement executed
changes are reflected
4. Also, repeat the above for
1. statement.execute("delete from empone where id=2");
5. Reading all the records from the table using executeQuery()
1. ResultSet resultset = statement.executeQuery("Select id,name from
empone");
6. while(resultset.next()) {
1. int eid = resultset.getInt("id");

https://www.evernote.com/shard/s433/client/snv?noteGuid=f94d3f21-708b-4a5a-b778-6237fd0599a2&noteKey=cf62dbf4e2f3c0af&sn=https%3A… 2/2
2/8/23, 1:09 PM SQL for Beginners - Part 85 - ODBC

Save Copy to Evernote

Last updated: May 13, 2020

SQL for Beginners - Part 85 - ODBC


SQL for Beginners - ODBC

1. MySQL Workbench Client internally uses JDBC driver for connecting to the Databases in
MySQL Server
2. SQL ODBC Query Client Tool requires ODBC driver for connecting to the Database in MySQL
Server
3. Downloading and Installing MySQL ODBC Driver
1. Windows Search ODBC and select 64bit
4. Creating DataSource Name
5. Downloading SQL ODBC Query Tool
6. JDBC and ODBC are the popular drivers for connecting to the MySQL DB

Regards,
Arun Motoori

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=6df4918b-9a71-40c1-8c30-da0e905a72c0&noteKey=3195add564df4829&sn=https%… 1/1
2/8/23, 1:09 PM SQL for Beginners - Part 86 - MySQL Shell Command Line Tool

Save Copy to Evernote

Last updated: May 13, 2020

SQL for Beginners - Part 86 - MySQL Shell


Command Line Tool
SQL for Beginners - MySQL Shell Command Line Tool

1. MySQL Shell Command Line Tool for connecting to the MySQL Server
2. Google Search for 'MySQL Shell Commands'

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=8bf28e5d-6127-490c-87b9-2ce7c0a307fe&noteKey=3c914bd7b7836f72&sn=https%3… 1/1
2/8/23, 1:09 PM SQL for Beginners - Part 87 - MySQL Command Line Client

Save Copy to Evernote

Last updated: May 13, 2020

SQL for Beginners - Part 87 - MySQL


Command Line Client
SQL for Beginners - MySQL Command Line Client

1. It comes by default with MySQL DB Software


2. Windows Search > MySQL and launch 'MySQL Command line client'
3. Give password as root
4. Perform required operations

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=1afbaee8-cde1-4525-b4b4-537a1e4dc37d&noteKey=13c859cef5f96524&sn=https%3… 1/1
2/8/23, 1:10 PM SQL for Beginners - Part 88 - Using default Windows Command Prompt for connecting to MySQL Server

Save Copy to Evernote

Last updated: May 13, 2020

SQL for Beginners - Part 88 - Using


default Windows Command Prompt for
connecting to MySQL Server
SQL for Beginners - Using default Windows Command Prompt for connecting to MySQL
Server

1. Go to C:\Program Files\MySQL\MySQL Server 8.0\bin


2. Type cmd
3. Execute the below commands:
1. mysql -u root -p
2. Give the password
3. Then perform the operations

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=081095da-77e5-4d1b-9d43-6e288064a4c9&noteKey=487061aa84271787&sn=https… 1/1
2/8/23, 1:11 PM SQL for Beginners - Part 89 - Types of SQL Statements

Save Copy to Evernote

Last updated: May 14, 2020

SQL for Beginners - Part 89 - Types of


SQL Statements
SQL for Beginners - Types of SQL Statements

1. DQL
2. DML
3. DDL
4. TCL
5. DCL

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=e75cca20-baa8-4aab-8814-14ba36d407e2&noteKey=2e9c13677eaef55e&sn=https%… 1/1
2/8/23, 1:11 PM SQL for Beginners - Part 90 - Grant and Revoke SQL Statements

Save Copy to Evernote

Last updated: May 14, 2020

SQL for Beginners - Part 90 - Grant and


Revoke SQL Statements
SQL for Beginners - Grant and Revoke SQL Statements

1. Create User in MySQL Server


2. Grant and Revoke Permissions
1. use qafox;
2. grant select on empone to 'userone';
3. revoke select on empone from 'userone';
4. grant create,delete,drop,select,insert,update,alter on empone to 'userone','usertwo';
5. revoke select,delete,drop,create,alter,insert,update on empone from
'userone','usertwo';

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=b7f317ce-bb39-4acc-9b40-c5f35a321c4b&noteKey=46a9d3aac0ef48c2&sn=https%3… 1/1
2/8/23, 1:11 PM SQL for Beginners - Part 91 - Temporary Tables

Save Copy to Evernote

Last updated: May 15, 2020

SQL for Beginners - Part 91 - Temporary


Tables
SQL for Beginners - Temporary Tables

1. Practical Demonstration

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=b978b859-8ad5-4aa4-985e-3e1eb7922d47&noteKey=8d77094996e5e840&sn=https… 1/1
2/8/23, 1:12 PM SQL for Beginners - Part 92 - Show Columns,Show Indexes,Show Privileges and Show Grants Statements

Save Copy to Evernote

Last updated: May 15, 2020

SQL for Beginners - Part 92 - Show


Columns,Show Indexes,Show Privileges
and Show Grants Statements
SQL for Beginners - Show Columns, Show Indexes, Show Privileges and Show Grants
Statements

1. Show Columns and Show Indexes


show columns from tablename;
show indexes from tablename;
show privileges;
show grants for 'userone';
show grants for 'usertwo';

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=fc6a3c29-71f1-4dc6-99d1-8fc2bbf95d66&noteKey=8509ca7df6d78429&sn=https%3A… 1/1
2/8/23, 1:14 PM SQL for Beginners - Part 93 - Inserting Null

Save Copy to Evernote

Last updated: May 15, 2020

SQL for Beginners - Part 93 - Inserting


Null
SQL for Beginners - Inserting Null

1. Practical Demonstration

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=8e503b17-b0b3-4e09-985e-527283aa0342&noteKey=6faf0940e56c2913&sn=https%… 1/1
2/8/23, 1:14 PM SQL for Beginners - Part 94 - Using trim() for trimming the corner characters of the specified Table values

Save Copy to Evernote

Last updated: May 16, 2020

SQL for Beginners - Part 94 - Using trim()


for trimming the corner characters of the
specified Table values
SQL for Beginners - Using trim() for trimming the corner characters of the specified Table
values

1. Practical Demonstration
1. use qafox;
2. Select trim('a' from 'arun');
3. Select trim('a' from 'rana');
4. Select trim('a' from 'aruna');
5. create table empone(name varchar(15));
6. insert into empone values('arun');
7. insert into empone values('naresh');
8. insert into empone values('varun');
9. insert into empone values('tharun');
10. insert into emptwo values('nandan');
11. Select * from emptwo;
12. Select trim('n' from name) from emptwo;

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=e7841d6a-baa1-4b9f-a561-8f73fcf5014c&noteKey=fa9ce73980e048a2&sn=https%3A… 1/1
2/8/23, 1:14 PM SQL for Beginners - Part 95 - Using wild-cards as normal characters

Save Copy to Evernote

Last updated: May 16, 2020

SQL for Beginners - Part 95 - Using wild-


cards as normal characters
SQL for Beginners - Using wild-cards as normal characters

1. Practical Demonstration

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=3afba9c4-8d42-46ab-8f24-d37d72eb3ba8&noteKey=5701b5d8b9f70bd8&sn=https%3… 1/1
2/8/23, 1:15 PM SQL for Beginners - Part 96 - Database Objects

Save Copy to Evernote

Last updated: May 16, 2020

SQL for Beginners - Part 96 - Database


Objects
SQL for Beginners - Database Objects

1. Terminology

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=78f5b439-14fd-451e-a5aa-e65215e1c8ec&noteKey=43d8d0fae96c246b&sn=https%3… 1/1
2/8/23, 1:15 PM SQL for Beginners - Part 97 - Creating Linux Virtual Machine

Save Copy to Evernote

Last updated: May 17, 2020

SQL for Beginners - Part 97 - Creating


Linux Virtual Machine
SQL for Beginners - Creating Linux Virtual Machine

1. Practical Demonstration

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=5fed2ce8-5190-4d54-9642-e59f42ca573a&noteKey=bea2f7ebcd089337&sn=https%3… 1/1
2/8/23, 1:15 PM SQL for Beginners - Part 98 - Installing MySQL in Linux Machine

Save Copy to Evernote

Last updated: May 17, 2020

SQL for Beginners - Part 98 - Installing


MySQL in Linux Machine
SQL for Beginners - Installing MySQL in Linux Machine

1. Practical Demonstration
1. sudo apt-get update
2. sudo apt-get install mysql-server
3. sudo mysql_secure_installation
4. sudo service mysql status
5. sudo service mysql stop
6. sudo service mysql start
7. sudo mysql -u root -p
8. Run SQL queries here

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=e9742e41-46db-4c1e-859a-84cc528574e8&noteKey=9f108b0e642609a0&sn=https%… 1/1
2/8/23, 1:15 PM SQL for Beginners - Part 99 - Using Putty for Connecting to a Remote Machine having MySQL and performing SQL operations

Save Copy to Evernote

Last updated: May 17, 2020

SQL for Beginners - Part 99 - Using Putty


for Connecting to a Remote Machine
having MySQL and performing SQL
operations
SQL for Beginners - Using Putty for Connecting to a Remote Machine having MySQL and
performing SQL operations

1. Practical Demonstration
1. sudo apt install ssh
2. Set to Host only adapter

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=843d51ed-469d-41b6-a053-c6ee052f9d34&noteKey=e6a78c20d5756511&sn=https%… 1/1
2/8/23, 1:16 PM SQL for Beginners - Part 100 - Oracle Database, SQL Plus, SQL Developer and Executing SQL Queries

Save Copy to Evernote

Last updated: May 18, 2020

SQL for Beginners - Part 100 - Oracle


Database, SQL Plus, SQL Developer and
Executing SQL Queries
SQL for Beginners - Oracle Database, SQL Plus, SQL Developer and Executing SQL Queries

1. Practical Demonstration
1. Download and Install Oracle
Download Part 1 and Part 2 of the Oracle 11g
2. SQL Plus
3. SQL Developer
Connecting to Oracle DB
4. Executing SQL Queries

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=3056bb88-9940-43f4-b85e-25a4cfd6f35c&noteKey=b7cc1333b607a129&sn=https%3… 1/1
2/8/23, 1:18 PM SQL for Beginners - Part 101 - Oracle SQL Queries

Save Copy to Evernote

Last updated: May 20, 2020

SQL for Beginners - Part 101 - Oracle SQL


Queries
SQL for Beginners - Oracle SQL (Executing SQL Queries)

1. Practical Demonstration
1. Retrieving Records:
1. Select * from Countries;
2. Select Country_Name from Countries;
3. Select Country_ID,Country_Name from Countries;
2. Describe
1. describe countries;
3. Where Clause
1. Select * from Countries where Region_Id=2;
4. Order By clause
1. Select * from Countries Order by Country_Name ASC;
2. Select * from Countries Order by Country_Name DESC;
3. Select * from Countries Order by Country_Name;
5. Arithmetic Operators
1. Select Salary,Salary+10000 from Employees;
2. Select Salary,Salary-10000 from Employees;
3. Select Salary,Salary*10 from Employees;
4. Select Salary,Salary/10 from Employees;
6. Relational Operators
1. Select * from Countries where Region_Id=2;
2. Select * from Countries where Region_Id<2;
3. Select * from Countries where Region_Id>2;
4. Select * from Countries where Region_Id<=2;
5. Select * from Countries where Region_Id>=2;
6. Select * from Countries where Region_Id<>2;
7. Logical Operators (and, or, not)
1. Select * from Countries where Region_id=2 and Country_Name<>'Canada';
2. Select * from Countries where Country_name='Canada' or Region_id=3;
3. Select * from Countries where Not region_id=2;
8. Between Operator
1. Select * from Employees where employee_id between 105 and 109;
2. Select * from Employees where employee_id not between 105 and 109;
3. Select * from Employees where first_name between 'Diana' and 'John' order by
first_name ASC;
9. In Operator:
https://www.evernote.com/shard/s433/client/snv?noteGuid=25237a43-a73b-425c-8d64-0f36a15e0614&noteKey=6f48ee6021d4ee59&sn=https%… 1/2
2/8/23, 1:18 PM SQL for Beginners - Part 101 - Oracle SQL Queries

1. Select * from Countries where Country_Name In ('Singapore','India','China');


2. Select * from
Terms Countries where
of Service Country_Name
Privacy Policy Not In ('Singapore','India','China');
Report SpamSave Copy to Evernote
10. Like operator and Wild Cards:
1. Select * from Countries where Country_Name like ('I%');
2. Select * from Countries where Country_Name like '_ndia';
11. Alias Name:
1. Select Country_Name as Country from Countries;
2. Select Country_Name Country from Countries;
12. Limiting Records
1. Select * from Countries where RowNum <=3;

Regards,
Arun Motoori

https://www.evernote.com/shard/s433/client/snv?noteGuid=25237a43-a73b-425c-8d64-0f36a15e0614&noteKey=6f48ee6021d4ee59&sn=https%… 2/2
2/8/23, 1:18 PM SQL for Beginners - Part 102 - Oracle SQL Built-in functions

Save Copy to Evernote

Last updated: May 20, 2020

SQL for Beginners - Part 102 - Oracle SQL


Built-in functions
SQL for Beginners - Oracle SQL Built-in functions

1. Select avg(Salary) from Employees;


2. Select sum(Salary) from Employees;
3. Select max(Salary) from Employees;
4. Select min(Salary) from Employees;
5. Select count(*) from Employees;
6. Select abs(-9) from dual;
7. Select Salary,mod(Salary,3) from Employees;
8. Select upper(Country_name) from Countries;
9. Select lower(Country_name) from Countries;
10. Select initcap(Country_name) from Countries;
11. Select Country_Name, length(Country_name) from Countries;
1. Select * from Countries where length(Country_name)=6;
12. Select Country_name, RPAD(Country_Name,30,'Q') from Countries;
13. Select Country_name, LPAD(Country_Name,30,'Q') from Countries;
14. Select Country_Name,instr(Country_Name,'e') from Countries;
15. Select Country_Name,substr(Country_Name,3,4) from Countries;
16. Select first_name,last_name,concat(first_name,last_name) from Employees;
1. Select first_name,last_name,concat(first_name,last_name) as FullName from
Employees;
17. Select Country_name,trim('a' from Country_name) from Countries;
1. Select trim('a' from 'aruna') from Dual;
2. Select Country_name,trim('A' from Country_name) from Countries;
3. Select Country_name,LTrim(Country_name,'A') from Countries;
4. Select ltrim('aruna','a') from Dual;
5. Select Country_name,RTrim(Country_name,'a') from Countries;
6. Select rtrim('aruna','a') from Dual;
18. Select hire_date,add_months(hire_date,2) from Employees;
19. Select hire_date,months_between('20-05-2020',hire_date) from Employees;
1. Select sysdate from dual;
20. Select hire_date,next_day(hire_date,'Monday') from Employees;
21. Select hire_date,last_day(hire_date) from Employees;
22. Select hire_date,to_char(hire_date,'DD-MM-YYYY') from Employees;
23. Select hire_date,to_char(hire_date,'DD-MON-YYYY') from Employees;
24. Select hire_date,to_char(hire_date,'DAY') from Employees;
25. Select hire_date,to_char(hire_date,'MONTH') from Employees;
https://www.evernote.com/shard/s433/client/snv?noteGuid=c49a5fd9-18ab-4cfe-acfa-22ffc0cb4e0f&noteKey=2936df44d608f47f&sn=https%3A%… 1/2
2/8/23, 1:18 PM SQL for Beginners - Part 102 - Oracle SQL Built-in functions

26. Select hire_date,to_char(hire_date,'YYYY') from Employees;


Terms
1. Select of Service
* from Privacy
Employees where Policy Report SpamSave Copy to Evernote
to_char(hire_date,'YYYY')='2007';
27. Select phone_number,to_number(substr(Phone_number,1,3))+10 from Employees;
28. Select to_date('25/November/1985') from Dual;

Regards,
Arun Motoori
QAFox.com

https://www.evernote.com/shard/s433/client/snv?noteGuid=c49a5fd9-18ab-4cfe-acfa-22ffc0cb4e0f&noteKey=2936df44d608f47f&sn=https%3A%… 2/2
2/8/23, 1:18 PM SQL for Beginners - Part 103 - Oracle SQL Queries (Part 2)

Save Copy to Evernote

Last updated: May 21, 2020

SQL for Beginners - Part 103 - Oracle SQL


Queries (Part 2)
SQL for Beginners - Oracle SQL Queries (Part 2)

1. Practical Demonstration
1. Creating the Table:
1. create table empone(id number(5),name varchar(15));
2. Select * from empone;
2. Inserting the Records into the Table
1. insert into empone values(1,'Arun');
2. insert into empone values(2,'Varun');
3. insert into empone values(3,'Tharun');
4. Select * from empone;
5. insert into empone values(4);
1. Error
6. insert into empone(id) values(4);
7. insert into empone values(5,null);
8. Select * from empone;
9. Select * from empone where name Is Null;
10. Select * from empone where name Is Not Null;
3. Update the Records
1. update empone set name='Kiran' where id=4;
4. Rename the table
1. rename empone to empA;
2. Select * from empone;
3. Select * from empA;
5. Delete the records from the Table
1. delete from empA where id=3;
2. Select * from empA;
3. delete from empA;
4. Select * from empA;
6. Delete the Table itself
1. drop table empA;
7. Data types
1. char
1. create table emptwo(letter char);
2. insert into emptwo values('a');
2. number
1. create table empthree(id number);
https://www.evernote.com/shard/s433/client/snv?noteGuid=557d12bd-ecdc-4166-a6c5-40f25e56fc47&noteKey=50f9d455409b8abb&sn=https%3… 1/2
2/8/23, 1:18 PM SQL for Beginners - Part 103 - Oracle SQL Queries (Part 2)

2. insert into empthree values(123456789);


Terms
3. of *Service
Select Privacy Policy
from empthree; Report SpamSave Copy to Evernote
4. create table empfour(id number(5));
5. insert into empfour values(123456789);
6. Select * from empfour;
3. varchar
1. create table empfive(name varchar(5));
2. insert into empfive values('Arun');
3. Select * from empfive;
4. date
1. create table empsix(hire_date date);
2. insert into empsix values('21-05-2020');
3. Select * from empsix;
8. Check constraint
1. create table empseven(id number,name varchar(15),country varchar(15)
check(country <> 'Ireland'));
2. insert into empseven values(1,'Arun','India');
3. insert into empseven values(2,'Varun','Ireland');
4. Select * from empseven;

Regards,

https://www.evernote.com/shard/s433/client/snv?noteGuid=557d12bd-ecdc-4166-a6c5-40f25e56fc47&noteKey=50f9d455409b8abb&sn=https%3… 2/2
2/8/23, 1:18 PM SQL for Beginners - Part 104 - Oracle SQL Queries (Part 3)

Save Copy to Evernote

Last updated: May 24, 2020

SQL for Beginners - Part 104 - Oracle SQL


Queries (Part 3)
SQL for Beginners - Oracle SQL Queries (Part 3)

1. Practical Demonstration
1. Alter Statement (add, modify, rename column and drop column)
1. create table emp1(id number,name varchar(15));
2. Select * from emp1;
3. alter table emp1 add country varchar(15);
4. Select * from emp1;
5. describe emp1;
6. alter table emp1 modify name varchar(20);
7. describe emp1;
8. alter table emp1 rename column country to location;
9. describe emp1;
10. alter table emp1 drop column location;
11. describe emp1;
2. Single Line and Multi Line Comments
1. -- Create a new table with emp1 name
2. create table emp1(id number,name varchar(15));
3. Select * from emp1;
4. /* Alter the table by doing the below
5. add a new column at the end of the existing columns in the table
6. modify the data type or size of the data type for a particular column
7. rename the name of the column to a different name
8. delete the column */
9. alter table emp1 add city varchar(15);
10. Select * from emp1;
11. describe emp1;
12. alter table emp1 modify name varchar(20);
13. describe emp1;
14. alter table emp1 rename column country to location;
15. describe emp1;
16. alter table emp1 drop column location;
17 describe emp1;
https://www.evernote.com/shard/s433/client/snv?noteGuid=fbfb6c27-9ba4-48d4-9fc3-2ac6c8f87af1&noteKey=a0c9a9dad66fdec6&sn=https%3A… 1/2
2/8/23, 1:18 PM SQL for Beginners - Part 104 - Oracle SQL Queries (Part 3)
17. describe emp1;
3. Group By Clause
Terms of Service Privacy Policy Report SpamSave Copy to Evernote
1. Select * from Countries;
2. Select Count(*) from Countries;
3. Select Count(*) from Countries where Group By region_id;
4. Select region_id, count(*) from Countries where Group By region_id;
4. Having Clause
1. Select region_id,count(*) from Countries group by region_id having count(*)>5;

Regards,
Arun Motoori
QAFox.com

https://www.evernote.com/shard/s433/client/snv?noteGuid=fbfb6c27-9ba4-48d4-9fc3-2ac6c8f87af1&noteKey=a0c9a9dad66fdec6&sn=https%3A… 2/2
2/8/23, 1:19 PM SQL for Beginners - Part 105 - Oracle SQL Queries (Part 4)

Save Copy to Evernote

Last updated: May 24, 2020

SQL for Beginners - Part 105 - Oracle SQL


Queries (Part 4)
SQL for Beginners - Oracle SQL Queries (Part 4)

1. Practical Demonstration
1. Set Operators
1. We can retrieve the data from different tables at a time using the Set Operators
2. Union (All eliminating duplicates)
1. create table empX(id number);
2. insert into empX values(1);
3. insert into empX values(3);
4. insert into empX values(5);
5. Select * from empX;
6. create table empY(id number);
7. insert into empY values(2);
8. insert into empY values(3);
9. insert into empY values(4);
10. Select * from empY;
11. Select * from empX union Select * from empY;
3. Union All (All and won't eliminate duplicates)
1. Select * from empX union all Select * from empY;
4. Intersect (Common)
1. Select * from empX intersect Select * from empY;
5. Minus (Only the table records which are not there in other table
1. Select * from empX minus Select * from empY;
2. Tables and Aliases
1. Select one.id,one.name,two.country
2. from empdetailsone one,empdetailstwo two
3. where one.id=two.id;
3. Joins
1. The purpose of Joins is to Join two tables for retrieving the records from two
tables
2. create table empxone(id number,firstname varchar(15));
3. insert into empxone values(1,'Arun');
4. insert into empxone values(2,'Varun');
5. insert into empxone values(4,'Tharun');
6. Select * from empxone;
7. create table empxtwo(id number,lastname varchar(15));
8. insert into empxtwo values(1,'Motoori');
https://www.evernote.com/shard/s433/client/snv?noteGuid=30cf2f96-8cd4-4db6-b3bd-b2da3235a97b&noteKey=79d8b80e712b198e&sn=https%… 1/2
2/8/23, 1:19 PM SQL for Beginners - Part 105 - Oracle SQL Queries (Part 4)
8. se t to e p t o a ues( , otoo );
9. insert into empxtwo values(4,'Kumar');
Terms of Service Privacy Policy Report SpamSave Copy to Evernote
10. insert into empxtwo values(5,'Rathod');
11. Select * from empxtwo;
12. Inner Join (Common records)
1. Select * from empxone
2. inner join empxtwo
3. on empxone.id=empxtwo.id;
13. left outer Join (Records in left table will be given importance and the right table
records will be adjusted)
1. Select * from empxone
2. left outer join empxtwo
3. on empxone.id=empxtwo.id;
14. right outer join
1. Select * from empxone
2. right outer join empxtwo
3. on empxone.id=empxtwo.id;
15. full outer join (Both the tables are given importance while joining)
1. Select * from empxone
2. full outer join empxtwo
3. on empxone.id=empxtwo.id;
16. Self Join (Table joining with itself)
1. create table empxthree(id number,firstname varchar(15),lastname
varchar(15),depid number);
2. Select *
3. from empxthree o,empxthree t
4. where o.id=t.depid;

https://www.evernote.com/shard/s433/client/snv?noteGuid=30cf2f96-8cd4-4db6-b3bd-b2da3235a97b&noteKey=79d8b80e712b198e&sn=https%… 2/2
2/8/23, 1:19 PM SQL for Beginners - Part 106 - Oracle SQL Queries (Part 5)

Save Copy to Evernote

Last updated: May 24, 2020

SQL for Beginners - Part 106 - Oracle SQL


Queries (Part 5)
SQL for Beginners - Oracle SQL Queries (Part 5)

1. Sub Query
1. Sub Query is a query inside another query
2. Outer Query
3. Inner Query (Sub Query)
4. Practical Demonstrations
1. Retrieve all the employees, who are from the same department of Bruce
1. Select department_id from Employees where first_name='Bruce';
2. Select * from Employees where department_id = (Select department_id
from Employees where first_name='Bruce');
5. Types of Sub Queries
1. Single Row Sub Query
2. Multi Row Sub Query
6. Multi-Row Sub Query and different Operators
1. We have to use in,any,all and exits operators
2. In Operator
1. Select * from employees where first_name='Steven';
2. Select department_id from employees where first_name='Steven';
3. Select * from employees where department_id = (Select department_id
from employees where first_name='Steven');
1. Error
4. Select * from employees where department_id In (Select department_id
from employees where first_name='Steven');
3. Any Operator
1. Select Salary from employees where department_id=60;
2. Select * from employees where Salary < (Select Salary from employees
where department_id=60);
1. Error
3. Select * from employees where Salary < any (Select Salary from
employees where department_id=60);
4. All Operator
1. Select * from employees where Salary < all (Select Salary from
employees where department_id=60);
5. Exists Operator
1. Select * from employees where exists (Select * from employees where
department_id=60);
https://www.evernote.com/shard/s433/client/snv?noteGuid=5a0447d3-6307-4905-9003-3939c02b6559&noteKey=03591da7f30db9f7&sn=https%… 1/2
2/8/23, 1:19 PM SQL for Beginners - Part 106 - Oracle SQL Queries (Part 5)
2. Select * from employees where exists (Select * from employees where
department_id=112);
Terms of Service Privacy Policy Report Spam Save Copy to Evernote
2. Integrity Constraints
1. Conditions we can apply on the Table Column Data
2. Not Null
1. Create table QAFoxOne(id number not null,name varchar(15));
2. insert into qafoxone values(1,'Arun');
3. insert into qafoxone(name) values('Varun');
4. insert into qafoxone values(null,'Tharun');
3. Unique
1. create table QAFoxTwo(id number unique,name varchar(15));
2. insert into qafoxtwo values(1,'Arun');
3. insert into qafoxtwo values(1,'Varun');
4. Primary Key
1. create table qafoxthree(id number primary key,name varchar(15));
2. insert into qafoxthree values(1,'Arun');
3. insert into qafoxthree(name) values('Varun');
4. insert into qafoxthree values(null,'Tharun');
5. insert into qafoxthree values(1,'Kiran');
5. Foreign Key
1. create table empp(id number primary key,name varchar(15));
2. insert into empp values(1,'Arun');
3. insert into empp values(2,'Varun');
4. insert into empp values(3,'Tharun');
5. Select * from empp;
6. create table empsal(id number,salary number,constraint empsal_id_rel foreign
key(id) references empp(id));
7. insert into empsal values(1,1400000);
8. insert into empsal values(5,700000);
1. Error
9. insert into empsal values(2,900000);
10. insert into empsal values(3,1100000);
11. Select * from empsal;
12. delete from empp where id=2;
1. Error
13. delete from empsal where id=2;
14. delete from empp where id=2;
6. Check
1. create table qafoxfour(id number,name varchar(15),country varchar(15)
check(country = 'USA'));
2. insert into qafoxfour values(1,'Arun','India');
i i f f l

https://www.evernote.com/shard/s433/client/snv?noteGuid=5a0447d3-6307-4905-9003-3939c02b6559&noteKey=03591da7f30db9f7&sn=https%… 2/2
2/8/23, 1:19 PM SQL for Beginners - Part 107 - DBeaver Universal DB Client Tool

Save Copy to Evernote

Last updated: May 25, 2020

SQL for Beginners - Part 107 - DBeaver


Universal DB Client Tool
SQL for Beginners - DBeaver Universal DB Client Tool

1. Practical Demonstration
1. Installing DBeaver Community Edition
2. Configuring it and using it

Regards,
Arun Motoori
QAFox.com

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=9dd8691c-efe9-4eb1-a422-1022279fef18&noteKey=0ecb301d41e30459&sn=https%3… 1/1
2/8/23, 1:19 PM SQL for Beginners - Part 108 - XAMPP for Practicing SQL

Save Copy to Evernote

Last updated: May 25, 2020

SQL for Beginners - Part 108 - XAMPP for


Practicing SQL
SQL for Beginners - XAMPP for Practicing SQL

1. Practical Demonstration
1. Installing XAMPP
2. Practicing SQL
1. Install Database in our local machine and start it
Download XAMPP from here and install it
Launch XAMPP and Start MySQL Relational Database Software which
comes by default with XAMPP
2. Open command prompt from C:/XAMPP/mysql/bin folder, connect to MySQL
database system and trigger different SQL statements given below:
Launch the command prompt from C:/XAMPP/mysql/bin folder
Provide a password to the Database System using -
mysqladmin.exe -u root password root
Now connect to Database using - mysql -u root -p
When prompted for password type root and press Enter
View the default databases inside the MySQL using - show databases;
Create a new database in MySQL using - create database qafox;
Confirm its creation using show databases;
Pick the newly created database using - use qafox;
View the tables inside the qafox database using - show tables;
Create a new table using - create table Employee(Name
VARCHAR(50), Location VARCHAR(50), Experience INTEGER);
Confirm its creation using show tables;
View the records inside the table using - select * from Employee;
Observe that you will see no records
Insert the new records into the table using:
Insert into Employee values('Venkat','Hyderabad',10);
Insert into Employee values('Gopal','Bangalore',8);
Insert into Employee values('Niharika','Pune',3);
Confirm new records insertion using select * from Employee;

Regards,

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=a9753b9a-ecd5-4212-ab4a-3d7697d9fd7e&noteKey=4dbd1d59555ac48f&sn=https%… 1/1
2/8/23, 1:20 PM SQL for Beginners - Part 109 - Savepoint

Save Copy to Evernote

Last updated: Jan 25, 2022

SQL for Beginners - Part 109 - Savepoint


Using savepoint we can save the different states of the table and rollback to the desired
state of the table when needed
Practical Demonstration
set autocommit=0
create table
start transaction;
select * from table
savepoint zero;
insert into table values
savepoint one;
insert into table values
savepoint two;
rollback to two;
rollback to one;
rollback to zero;

By,
Arun Motoori;

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=4fd275fb-d4ee-488c-8ee9-f9cc9dbe41b7&noteKey=c10ca07df17f8db3&sn=https%3A… 1/1
2/8/23, 1:20 PM SQL for Beginners - Part 110 - Uninstalling MySQL Server completely from Windows Machine

Save Copy to Evernote

Last updated: Jan 3, 2023

SQL for Beginners - Part 110 - Uninstalling


MySQL Server completely from Windows
Machine
Un-install from Control Panel
Remove MySQL from Program Files
Remove MySQL form Program Files (x86)
Remove MySQL from User Data hidden folder
Remove MySQL from C > Users > username > AppData > Roaming > MySQL

By,
Arun Motoori

Terms of Service Privacy Policy Report Spam

https://www.evernote.com/shard/s433/client/snv?noteGuid=22107334-f9dc-4205-9df5-dd994e80ce69&noteKey=2c086b3f59331b1b&sn=https%3… 1/1

You might also like