0% found this document useful (0 votes)
5 views4 pages

SQL DML: Insert & Retrieve Data Guide

The document provides SQL DML commands for inserting and retrieving data from a database. It includes steps to create a database and a table, insert data into the table, and retrieve the data using select statements. The example demonstrates creating a database named 'test22' and a table 'uses' with sample data entries.

Uploaded by

prasannasolav6
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views4 pages

SQL DML: Insert & Retrieve Data Guide

The document provides SQL DML commands for inserting and retrieving data from a database. It includes steps to create a database and a table, insert data into the table, and retrieve the data using select statements. The example demonstrates creating a database named 'test22' and a table 'uses' with sample data entries.

Uploaded by

prasannasolav6
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Inserting and retrieving data from database able using SQLDML commands.

Code:

Select or Create a Database

create database if not exists test22;

use test22;

show databases;

Create a Table(if not exists)

create table if not exists uses(

id int auto_increment primary key,

name varchar(100),

email varchar(100));

desc uses;

Insert Data into the Table


insert into uses(name,email)

values("Abhay","Abhay12@[Link]"),

("Vedant","Vedant13@[Link]");

Retrieve Data from the Table

select * from uses;


Inserting and retrieving data from database able using SQLDML
commands.
Code:

Select or Create a Database

create database if not exists test22;

use test22;

show databases;

Create a Table(if not exists)

create table if not exists uses(

id int auto_increment primary key,

name varchar(100),

email varchar(100));

desc uses;
Insert Data into the Table

insert into uses(name,email)

values("Abhay","Abhay12@[Link]"),

("Vedant","Vedant13@[Link]");

Retrieve Data from the Table

select * from uses;

You might also like