28. Insert and update data using DDL, DML, and DCL statements.
VESRN TECHNOLOGIES
Learn Technology Easily
Programming | ITI | Practical Exercises
MySQL Practical
Insert and update data using DDL, DML and DCL statements.
Create Database
CREATE DATABASE iti_training; USE iti_training;
Create Table
CREATE TABLE trainee (
id INT PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(50),
trade VARCHAR(30),
marks INT
);
Insert Data
INSERT INTO trainee(name, trade, marks)
VALUES
('Raju','Electrician',78),
('Kumar','Fitter',82),
('Ravi','Welder',69);
Update Data
UPDATE trainee SET marks=85 WHERE name='Raju';
Result
DDL used to create and modify table structures. DML used to insert, update and delete records. DCL used to control permissions.
I practiced all under my trainer Venugopal Sir.