top of page
Search

Simple introduction to SQL

Writer's picture: PinnacleVex KA AnalyticsPinnacleVex KA Analytics

Introduction

SQL (Structured Query Language) is a common tool for retrieving data from relational databases such as MySQL, SQL Server, MariaDB, and PostgreSQL. Together with R and Python, SQL is one of the top skill in mastering Data Science.


What is SQL?

SQL stands for Structured Query Language, it’s a language for manipulating and talking about data in databases but was originally called SEQUEL for Structured English Query Language.

SQL is the standard language for Relational Database System and all the Relational Database Management Systems (RDMS) like MS Access, Microsoft Transact-SQL or T-SQLMySQL, SQLite, Oracle, Postgres, SQL Server, Sybase and Informix.


What is Syntax?

SQL is followed by a unique set of rules and guidelines called Syntax.

We need to understand what are the basic parts of a statement to start building SQL statements. To get an answer from a database or to make any change to database is called a statement.

All the statements start with any of the keywords like SELECT, INSERT, UPDATE, DELETE, ALTER, DROP, CREATE, USE, SHOW and all the statements end with a semicolon (;).

Statement.


What is a Statement?

A statement is made up of Clauses and Clauses are the basic components of statements that make up the whole and these clauses are constructed out of keywords, which tell to the the database to take some action.


Note: SQL is case insensitive which means SELECT and select have same meaning in SQL statements.


Most Important Commands for daily use


CREATE DATABASE  => To create a new database
CREATE TABLE  => To create a new table
INSERT INTO  => To insert new data into a database
SELECT => To extract data from a database
UPDATE => To update data in a database
DELETE  => To delete data from a database
ALTER DATABASE  => To modify a database
ALTER TABLE  => To modify a table
DROP TABLE  => To delete a table

You can download this Class table and try yourself.

If want to select all columns from a table we can use an asterisk (*) following a SELECT to select all columns.


SELECT * FROM Class;

If require only Name and Age columns then we can use those particular columns in SELECT clause.


SELECT Name, Age FROM Class;

Happy Learning !!! :)

 
 
 

Recent Posts

See All

Basic Power BI Interview Questions

1. What is Power BI? Power BI is a business analytics service by Microsoft, and collection of software services, apps, and connectors...

BASICS OF MICROSOFT EXCEL

We can't assume any job/work without an Excel, if we go for any job interview which requires basic excel skills. Basic means we should be...

Comments


bottom of page