Arrow

SQL CRUD Operations

AuthorHariom Prajapati

Pubish Date03 Jul 2022

categoryMySql

CRUD operation means create read update delete operation in a table. 

1) Create operation

 In this, we can create a table by the same method which we discuss above  to create table.

sql crud operation

2) Read operation

 In this we can read data inserted in a table .this process is the same as the select statement.

For read Where clause

 The where clause is used to filter records. It means that suppose we need to search all details or single detail from the table then we use this respectively.

 

Syntax -

select * from table_name;

or

Select * from table_name where column_name = details need to search from selected column ;

sql crud operation
sql crud operation

3) Update Operation

 The update statement use to modify the existing record in a table.

 

Syntax -

updated table_name set coloumn_name =  new_data where coloumn_name= old_data;

sql crud operation

 

4) Delete Operation

The delete statement is used to delete existing records in a table.

 

  •  Delete an existing record 

This is used to delete an existing record from a table.

 

 Syntax -

 Delete from table_name where column_name = data ;

sql crud operation


  •  Detele all data from a table This is used to delete the entire data from a table. 

 

Syntax -

Delete from table_name ;

or

drop table table_name;

sql crud operation