SQL CRUD operation - Ready Reckoner


Hey friends, SQL is a large topic, but you must knows the CRUD operations atleast to be able to do the minimum basic tasks in SQL. Hence, check out this post for a Ready Reckoner of SQL CRUD operation queries. CRUD stands for Create, Read, Update and Delete in SQL.

1. For Displaying records:

select * from [table_name];
select * from [table_name] where [field_name]='1';

2. Deleting specific records:

delete from [table_name] where [field_name]>0;

3. Insert Records

insert into [table_name] (field1, field2, field3,...) values (value1, value2, value3,...);
insert into [table_name] values (value1, value2, value3,...);

4. Update Records:

update [table_name] set [field1]=[new_value] where [field2]="1";

By the way if you are preparing for an upcoming interview, then you must check out this Top SQL Interview questions cheatsheet.

Follow Me on Social Media

Advertisement
FREE Sales CRM Software

Fully customizable CRM Software for Freelancers and Small Businesses

Signup for Free

Sign up for DigitalOcean Cloud

Get FREE $200 credits, deploy your hobby projects for Free

DigitalOcean Referral Badge
Sign up for Hostinger Cloud or VPS plans and get upto 20% Discount