SQL TutorialLast Updated : 27 Sep, 2023ReadDiscuss(30)CoursesSQL is a standard database language used to access and manipulate data in databases. SQL stands for Structured Query Language. SQL was developed by IBM Computer Scientists in the 1970s. By executing queries SQL can create, update, delete, and retrieve data in databases like MySQL, Oracle, PostgreSQL, etc. Overall SQL is a query language that communicates with databases.In this SQL tutorial, you’ll learn all the basic to advanced concepts like SQL queries, SQL join, SQL injection, SQL insert, create tables in SQL. SQL is easy to learn, there are no prerequisites to learning SQL.What is a Database?Data is the new fuel of this world but only data is unorganized information, so to organize that data we make a database. A database is the organized collection of structured data which is usually controlled by a database management system (DBMS). Databases help us with easily storing, accessing, and manipulating data held on a computer.‘Recent Articles’ on SQLBasicsClauses / OperatorsFunctionsQueriesSQL-InjectionPL/SQLMySQLSQL ServerMiscQuick LinksSQL Basics:Structured Query LanguageSQL | DatatypesSQL | DDL, DML, TCL and DCLSQL | TRANSACTIONSSQL | VIEWSSQL | CommentsSQL | ConstraintsSQL | Creating RolesSQL | IndexesSQL | SEQUENCESSQL | Query ProcessingCTE in SQLSQL Trigger | Student DatabaseBook Management DatabaseIntroduction to NoSQLSQL Clauses / Operators:SQL | WITH clauseSQL | With Ties ClauseSQL | Arithmetic OperatorsSQL | Wildcard operatorsSQL | Intersect & Except clauseSQL | USING ClauseSQL | MERGE StatementMERGE Statement in SQL ExplainedSQL | DDL, DML, DCL and TCL CommandsSQL | CREATE DOMAINSQL | DESCRIBE StatementSQL | Case StatementSQL | UNIQUE ConstraintSQL | Create Table ExtensionSQL | ALTER (RENAME)SQL | ALTER (ADD, DROP, MODIFY)SQL | LIMIT ClauseSQL | INSERT IGNORE StatementSQL | LIKESQL | SOMESQL | OFFSET-FETCH ClauseSQL | Except ClauseCombining aggregate and non-aggregate values in SQL using Joins and Over clauseSQL | ALL and ANYSQL | EXISTSSQL | GROUP BYSQL | Union ClauseSQL | AliasesSQL | ORDER BYSQL | SELECT TOP ClauseSQL | UPDATE StatementSQL | DELETE StatementSQL | INSERT INTO StatementSQL | AND and OR operatorsSQL | WHERE ClauseSQL | Distinct ClauseSQL | SELECT QuerySQL | DROP, TRUNCATESQL | CREATESQL | Join (Cartesian Join & Self Join)SQL | Alternative Quote OperatorSQL | Concatenation OperatorSQL | MINUS OperatorSQL | DIVISIONSQL | NOT OperatorSQL | BETWEEN & IN OperatorSQL | Join (Inner, Left, Right and Full Joins)SQL | CHECK ConstraintSQL-Injection:SQL InjectionHow to use SQLMAP to test a website for SQL Injection vulnerabilityMitigation of SQL Injection Attack using Prepared Statements (Parameterized Queries)Basic SQL Injection and Mitigation with ExampleSQL Functions:SQL | Mathematical functions (SQRT, PI, SQUARE, ROUND, CEILING & FLOOR)SQL | Conversion FunctionSQL general functions | NVL, NVL2, DECODE, COALESCE, NULLIF, LNNVL and NANVLSQL | Conditional ExpressionsSQL | Character Functions with ExamplesSQL | Date Functions (Set-1)SQL | Date Functions (Set-2)SQL | LISTAGGSQL | Aggregate functionsSQL | Functions (Aggregate and Scalar Functions)SQL | Date functionsSQL | NULLSQL | Numeric FunctionsSQL | String functionsSQL | Advanced FunctionsSQL Queries:SQL | Joining three or more tablesSQL | How to Get the names of the tableSQL | Sub queries in From ClauseSQL | Correlated SubqueriesSQL | Top-N QueriesSQL | SUB QueriesSQL | How to print duplicate rows in a table?SQL | How to find Nth highest salary from a tableDBMS | Nested Queries in SQLSQL query to find second highest salary?PL/SQL:PL/SQL IntroductionCursors in PL/SQLSum Of Two Numbers in PL/SQLReverse a number in PL/SQLFactorial of a number in PL/SQLPrint Patterns in PL/SQLDecision Making in PL/SQLOracle SQL | PseudocolumnSQL | Procedures in PL/SQLPrint different star patterns in SQLGCD of two numbers in PL/SQLCentered triangular number in PL/SQLFloyd’s triangle in PL/SQLConvert distance from km to meters and centimeters in PL/SQLConvert the given numbers into words in Pl/SQLSum of digits of a number in PL/ SQLSum of digits equal to a given number in PL/SQLSum and average of three numbers in PL/SQLCheck whether a string is palindrome or not in PL/SQLCount odd and even digits in a number in PL/SQLNo. of vowels and consonants in a given string in PL/SQLArea and Perimeter of a circle in PL/SQLFinding sum of first n natural numbers in PL/SQLArea and Perimeter of Rectangle in PL/SQLSum of the first and last digit of a number in PL/SQLCount no. of characters and words in a string in PL/SQLGreatest number among three given numbers in PL/SQLConcatenation of strings in PL/SQLPL/SQL | User InputMySQL:MySQL | Regular expressions(Regexp)MySQL | Grant/Revoke PrivilegesMySQL | DATABASE() and CURRENT_USER() FunctionsMySQL | BIN() FunctionMySQL | IFNULLMySQL | LAST_DAY() FunctionMySQL | RENAME USERMySQL | DROP USERMySQL | CREATE USER StatementMySQL | Change User PasswordPHP | MySQL WHERE ClausePHP | MySQL ORDER BY ClausePHP | MySQL UPDATE QueryPHP | MySQL Delete QueryPHP | MySQL LIMIT ClausePHP | MySQL Select QueryPHP | Inserting into MySQL databasePHP | MySQL ( Creating Table )PHP | MySQL ( Creating Database )SQL Server:SQL SERVER | Conditional StatementsSQL Server IdentitySQL Server | STUFF() FunctionMisc:SQL using Python | Set 1SQL using Python and SQLite | Set 2SQL using Python | Set 3 (Handling large data)Check if Table, View, Trigger, etc present in OraclePerforming Database Operations in Java | SQL CREATE, INSERT, UPDATE, DELETE and SELECTDifference between Simple and Complex View in SQLDifference between Static and Dynamic SQLHaving Vs Where Clause?Inner Join Vs Outer JoinDifference between SQL and NoSQLWhy to learn SQL?SQL helps you to easily get information from data at high efficiency. To manipulate the data in databases like Create, Read, Edit, and delete we use SQL queries. Users can interact with data stored in relational database management systems. Anyone who knows the English language can easily write SQL queries. Some of the key features of SQL are given below:Without a lot of coding knowledge we can manage a database with SQL.SQL works with database systems from Oracle, IBM, Microsoft, etc.Simple and easy to learn.SQL is ANSI and ISO standard language for database manipulations.SQL retrieves large amounts of data very fast.Applications of SQLIn data-driven industries where managing databases is very important in regular, Here are some important SQL applications.To support client/server architecture, software engineers use SQL to establish the connection between back-end and front-end.SQL can also be used in the 3-tier architecture of a client, an application server, and a database.SQL is used as a Data Definition Language(DDL) in which we can independently create a database, define the structure, use it, and discard it when its work is done.SQL is used as a Data Manipulation Language(DML) in which we can enter data, modify data, extracting data.SQL is used as a Data Control Language(DCL) it specifies how we can protect our database against corruption and misuse.Quick Links:SQL | Subjective ProblemsSQL | Multiple Choice QuestionsSQL | Interview QuestionsSQL Interview Questions | Set 1SQL Interview Questions | Set 2SQL | Commonly asked DBMS interview questions | Set 1SQL | Commonly asked DBMS interview questions | Set 2If you’re looking out for a worthwhile and reliable SQL tutorial for beginners, (or experts as well), then you must go through with this resource. Also, here you’ll get SQL interview questions, exercises, examples, etc.