SQL Truncate

This command deletes all records from table. Truncate is a DDL command. Syntax:

Example:

ORDER BY The ORDER BY clause arranges the table or column in ascending or descending orders. By default, it is ascending order. ‘ASC’ used …

Read moreSQL Truncate

SQL Operators

Arithmetic Operators Arithmetic operators are +, -, *, /, % performs addition, subtraction, multiplication, division, modulo respectively. Example:   Select 100+222; Select salary+100 From teacher Where teacher_id=1; Following output screen shows different arithmetic operations. We can perform single operation at …

Read moreSQL Operators

SQL Scalar Functions

TEACHER Table LCASE() Function The LCASE() function is used to return lower case values of specified column. Syntax: Select Lcase(column_name) from table_name; Example: Select Lcase(teacher_name) from teacher; Syntax: Select Lcase(column_name) from table_name [where condition]; Example: Select Lcase(teacher_name) from teacher where …

Read moreSQL Scalar Functions

SQL Aggregate Functions

Max() Function The Max() function returns the maximum value of specified column. Syntax: Select Max(column_name) From table_name; Example: Select Max(salary) From teacher; Min() Function The Min() function returns the minimum value of specified column. Syntax: Select Min(column_name) From table_name; Example: …

Read moreSQL Aggregate Functions

SQL CONSTRAINTS

SQL Constraints specifies the rules/limitations/restrictions for data present in table. SQL Constraints are specified at the time of table creation or after table creation using ALTER command. There are two types of constraints column-level constraint and table-level constraint. As the …

Read moreSQL CONSTRAINTS

SQL Data Control Language

Data Control Language decides to whom should (which user) permit access privileges. GRANT and REVOKE are the commands of DCL. GRANT: It gives privileges to user. REVOKE: It takes back privileges from granted user. Data Query Language Data Query Language …

Read moreSQL Data Control Language

SQL Data Definition Language

Data definition language directly effects on the structure/schema of the database. CREATE, ALTER, DROP are the commands of DDL. CREATE: Creates new database, table, or view of table. ALTER: Modifies the database or table. MODIFY, ADD keywords are used in …

Read moreSQL Data Definition Language

SQL Commands

SQL commands are classified into four groups on the basis of their nature. DDL (Data Definition Language) DML (Data Manipulation Language) DCL (Data Control Language) DQL (Data Query Language) NOTE: This symbol ‘[ ] ‘indicates optional. SQL is not a …

Read moreSQL Commands

SQL Tutorial for Beginners

SQL tutorial provides basic and advanced concepts of Structured Query Language and how you deploy SQL to work with a relational database system. Our SQL tutorial is designed for beginners and professionals. SQL (Structured Query Language) is used to perform operations …

Read moreSQL Tutorial for Beginners

Introduction to SQL

SQL Introduction SQL is Standard Query Language. This language is used to communicate or interact with database. In other words, SQL is used to access and manage data or information in the database by performing many different operations on data …

Read moreIntroduction to SQL