Top Posts
Reliance Jio launches streaming platform JioGamesWatch
Microsoft Teams down for thousands of users
Carbon: Google programming language as a C++ successor
JavaScript MCQs II
JavaScript MCQs I
Problem Solving Approach
Terms related to Network Security
Set in C++STL
Computer network attack (CNA)
Indexing in DBMS
TECHARGE
  • HOME
  • BLOGS
  • TUTORIALS
    • ALL TUTORIALS
    • PROGRAMMING TUTORIALS
      • JAVA TUTORIALS
      • C++ TUTORIAL
      • C PROGRAMMING TUTORIALS
      • PYTHON TUTORIAL
      • KNOWLEDGE MANAGEMENT TUTORIALS
      • DATA STRUCTURE AND ALGORITHM TUTORIALS
      • PROGRAMMING EXAMPLES
        • CPP EXAMPLES
        • JAVA EXAMPLES
        • C++ GRAPHICS PROGRAM
    • PROJECTS
      • PYTHON PROJECTS
      • SWIFT PROJECT
    • PPROGRAMMING QUIZ
    • DBMS TUTORIALS
    • COMPUTER NETWORK TUTORIALS
    • COMPUTER NETWORK SECURITY TUTORIALS
    • E COMMERCE TUTORIALS 
    • AWS TUTORIAL
    • INTERNET OF THINGS
    • CHEATSHEET
  • MORE
    • JOBS AND INTERNSHIPS
    • INTERVIEW PREPARATION
    • TECH BOOK
    • TECH NEWS
    • INSTAGRAM GALLERY
    • UNIVERSITY PAPERS
    • MNC TWEETS
    • THINKECO INITIATIVES
    • WEB STORIES
    • CONTACT US
  • WRITE +
  • ABOUT US
  • HIRE US
  • BEST COURSES
Dbms Tutorials

SQL Tutorial

by anupmaurya April 6, 2022
written by anupmaurya 1 comment

SQL (Structured Query Language) is used to perform operations on the records stored in the database such as updating records, deleting records, creating and modifying tables, views, etc.

Table of Contents

    • History of the SQL
  • What is SQL
  • Why SQL is required
  • SQL Commands
      • DDL Commands
      • DML Commands
      • DCL Commands
      • TCL -Transaction Control Language

History of the SQL

The SQL language was originally developed at the IBM research laboratory in San José, in connection with a project developing a prototype for a relational database management system called System R in the early 70s. The first database management systems based on SQL became available commercially by the end of the 70s.

What is SQL

  • SQL stands for Structured Query Language.
  • It is designed for managing data in a relational database management system (RDBMS).
  • It is pronounced as S-Q-L or sometime See-Qwell.
  • SQL is a database language, it is used for database creation, deletion, fetching rows, and modifying rows, etc.
  • SQL is based on relational algebra and tuple relational calculus.

All DBMS like MySQL, Informix, PostgreSQL, Oracle, MS Access, Sybase, and SQL Server use SQL as standard database language.

Why SQL is required

SQL is required:

  • To create new databases, tables and views
  • To insert records in a database
  • To update records in a database
  • To delete records from a database
  • To retrieve data from a database

SQL Commands

The standard SQL commands to interact with relational databases are CREATE, SELECT, INSERT, UPDATE, DELETE and DROP. These commands can be classified into the following groups based on their nature −

DDL Commands

  • DDL stands for Data Definition Language
  • DDL commands are used to change the structure of the table like creating a table, deleting a table, altering a table, etc.
  • DDL commands are auto-committed, which means changes are permanent, rollback is not possible.
Sr.No.Command & Description
1CREATE: Creates a new table, a view of a table, or other objects in the database.
2ALTER: Modifies an existing database object, such as a table.
3DROP: Deletes an entire table, a view of a table, or other objects in the database.
Data Definition Language

DML Commands

  • DDL stands for Data Manipulation Language
  • DML commands are used to modify the database. It is responsible for all forms of changes in the database.
  • DML commands are not auto-committed as DDL, they can be rollback.
Sr.No.Command & Description
1SELECT: Retrieves certain records from one or more tables.
2INSERT: Creates a record.
3UPDATE: Modifies records.
4DELETE: Deletes records.
Data Manipulation Language

DCL Commands

  • DCL stands for Data Control Language
  • DCL commands are used to grant and take back authority from any database user.
Sr.No.Command & Description
1GRANT: Gives a privilege to the user.
2REVOKE: Takes back privileges granted from the user.
Data Control Language

TCL -Transaction Control Language

  • TCL commands can only use with DML commands like INSERT, DELETE and UPDATE only.
  • They are auto-committed to the database that’s why they cannot be used while creating tables or dropping them.
Sr.No.Command & Description
1COMMIT: Commit command is used to save all the transactions to the database.
2ROLLBACK: Rollback command is used to undo transactions that have not already been saved to the database.
3SAVEPOINT: It is used to roll the transaction back to a certain point without rolling back the entire transaction.
Transaction Control Language

Once the commands are executed, the structure created is stored or saved automatically.

mySqlSQLsql commandsSQLlite
Share 12 FacebookTwitterLinkedinRedditWhatsappTelegramEmail
anupmaurya

Hey there, My name is Anup Maurya. I was born with love with programming and works at TCS. One of best global (IT) services and consulting company as System Administrator . I also love graphics designing. It's my pleasure to have you here.

previous post
Covid-19 Tracker Application Using Python
next post
SQL Datatypes

You may also like

Indexing in DBMS

Indexed sequential access method (ISAM)

Lock Based Protocols in DBMS

Closure in DBMS | How to Find Closure

Characteristics of DBMS

Types of database utilities and its functions

DBMS Functions

Different types of Database Users

B+ Tree

Concurrency Control in DBMS

1 comment

Adam November 23, 2020 - 10:41 am

Excellent post however , I was wondering if you could write a
litte more on this topic? I’d be very grateful if you could elaborate a little bit further.

Kudos!

Comments are closed.

SQL Tutorial

  • SQL Introduction
  • SQL Datatypes
  • SQL Commands

Recent Posts

  • Reliance Jio launches streaming platform JioGamesWatch

    August 6, 2022
  • Microsoft Teams down for thousands of users

    July 21, 2022
  • Carbon: Google programming language as a C++ successor

    July 19, 2022

EDUCATIONAL

  • 5+ Best Humanoid Robots In The World

  • Difference between Google Cloud Platform, AWS and Azure

  • Google Apps You Should Be Using in 2022

  • Top Sites From Where You Can Learn

  • PyScript: Python in the Browser

  • Best Fake Email Generators (Free Temporary Email Address)

  • How to Find Out Who Owns a Domain Name

  • Mobile phone brands by country of origin

  • How to start a new YouTube Channel in 2022

  • Best way to use google search you won’t believe exist

CHEATSHEET

  • HTML Cheatsheet

  • C++ Programming language Cheatsheet

  • Git and Github 2022 Cheat Sheet

  • ReactJs Cheatsheet

  • Linux Commands Cheat Sheet

  • C Programming language Cheatsheet

  • Scala Cheatsheet

PROJECTS

  • Python text to Speech

  • StopWatch using Python

  • Python Rock Paper Scissors Game

  • Currency Converter in Python

  • Alarm clock GUI application with tkinter

  • Print emojis using python without any module

  • Country Date and Time using Python

  • Covid-19 Tracker Application Using Python

  • Python | GUI Calendar using Tkinter

  • Python: Shutdown Computer with Voice

  • Python GUI Calculator using Tkinter

  • Convert an Image to ASCII art using Python

TUTORIALS

  • JAVA TUTORIAL
  • COMPUTER NETWORK
  • DBMS TUTORIAL
  • E-COMMERCE TUTORIAL
  • KNOWLEDGE MANAGEMENT
  • C++ PROGRAMMING
  • COMPUTER NETWORK SECURITY
  • AMAZON WEB SERVICES

TECH NEWS

  • Reliance Jio launches streaming platform JioGamesWatch

  • Microsoft Teams down for thousands of users

  • Carbon: Google programming language as a C++ successor

  • 5+ Best Humanoid Robots In The World

TERMS & POLICY

  • PRIVACY POLICY
  • TERMS AND CONDITIONS

COMPILERS

  • JAVA COMPILER
  • PYTHON COMPILER
  • JS COMPILER
  • C++ COMPILER
  • C COMPILER

JOBS AND INTERNSHIPS

  • TCS off-campus hiring 2022 for software engineers- 2019, 2020, & 2021 Batches

    February 27, 2022
  • Deloitte Recruitment For Any Graduates as Learning Operations Associate Analyst

    February 18, 2022
  • HP Recruitment For Tech Support Intern Position

    February 16, 2022
  • EY Hiring- PAS Global Immigration Advanced Analyst

    February 14, 2022
  • Amazon Recruitment Drive for Virtual Customer Support Associate Position

    February 12, 2022
Join Us On Telegram

@2019-21 - All Right Reserved. Designed and Developed by Techarge

TECHARGE
  • HOME
  • BLOGS
  • TUTORIALS
    • ALL TUTORIALS
    • PROGRAMMING TUTORIALS
      • JAVA TUTORIALS
      • C++ TUTORIAL
      • C PROGRAMMING TUTORIALS
      • PYTHON TUTORIAL
      • KNOWLEDGE MANAGEMENT TUTORIALS
      • DATA STRUCTURE AND ALGORITHM TUTORIALS
      • PROGRAMMING EXAMPLES
        • CPP EXAMPLES
        • JAVA EXAMPLES
        • C++ GRAPHICS PROGRAM
    • PROJECTS
      • PYTHON PROJECTS
      • SWIFT PROJECT
    • PPROGRAMMING QUIZ
    • DBMS TUTORIALS
    • COMPUTER NETWORK TUTORIALS
    • COMPUTER NETWORK SECURITY TUTORIALS
    • E COMMERCE TUTORIALS 
    • AWS TUTORIAL
    • INTERNET OF THINGS
    • CHEATSHEET
  • MORE
    • JOBS AND INTERNSHIPS
    • INTERVIEW PREPARATION
    • TECH BOOK
    • TECH NEWS
    • INSTAGRAM GALLERY
    • UNIVERSITY PAPERS
    • MNC TWEETS
    • THINKECO INITIATIVES
    • WEB STORIES
    • CONTACT US
  • WRITE +
  • ABOUT US
  • HIRE US
  • BEST COURSES