Mysql Algorithm
Mysql Algorithm
Aim:
Algorithm:
Algorithm:
1. Open MYSQL WORKBENCH8.0 CE
2. Connect to MYSQL Using Password :kgac@123
3. Create a shop database and create table stock using create table
queries.
4. Insert the values in that table using insert queries
5. Update, remove and delete the table data using update and delete
queries
6. Close MYSQL App
Result:
The above MYSQL statements are executed successfully
Algorithm:
1. Open MYSQL WORKBENCH8.0 CE
2. Connect to MYSQL Using Password :kgac@123
3. Create a company database and create table employee using create
table queries.
4. Insert the values in that table using insert queries
5. Retrieve the relevant information using select queries with where
condition
6. Close MYSQL App
Result:
The above MYSQL statements are executed successfully
Ex.No:4 Create a student marks table using MYSQL and apply
aggregate functions.
Aim:
To Create a student marks table and apply aggregate functions.
Algorithm:
1. Open MYSQL WORKBENCH8.0 CE
2. Connect to MYSQL Using Password :kgac@123
3. Create a college database and create table student_mark using create
table queries.
4. Insert the values in that table using insert queries
5. Apply the aggregate functions and get the result using select queries.
6. Close MYSQL App
Result:
The above MYSQL statements are executed successfully
Ex.No:5 Write MYSQL queries to join two tables (Inner join, Outer
join).
Aim:
To create a queries to join two tables.
Algorithm:
1. Open MYSQL WORKBENCH8.0 CE
2. Connect to MYSQL Using Password :kgac@123
3. Create a shop database and create table customer and order using
create table queries.
4. Insert the values in that table using insert queries
5. Join the table using INNER JOIN, LEFT OUTER JOIN and RIGHT OUTER
JOIN in select queries.
6. Close MYSQL App
Result:
The above MYSQL statements are executed successfully
Ex.No:6 Write MYSQL statement to create a new user and set a
password and privileges for an existing database.
Aim:
To create a new user and set a password and privileges for an existing
database.
Algorithm:
1. Open MYSQL WORKBENCH8.0 CE
2. Connect to MYSQL Using Password :kgac@123
3. Use MYSQL database and select the users using select queries.
4. Create a new user along with username and password.
5. Grant privileges to new user using Grant statement.
6. View and revoke privileges using show and revoke queries.
7. Close MYSQL App
Result:
The above MYSQL statements are executed successfully
Algorithm:
1. Open MYSQL WORKBENCH8.0 CE
2. Connect to MYSQL Using Password :kgac@123
3. Create a college database and create table student_data using create
table queries.
4. Insert the values in that table using insert queries
5. Select name of the student containing exactly four characters using
like operator and determine the age of each of the students using
TIMESTAMP FUNCTION.
6. Close MYSQL App
Result:
The above MYSQL statements are executed successfully