SQL Tutorial

SQL Tutorial SQL Introduction SQL Syntax SQL OPERATORS SQL COMMANDS SQL Queries

SQL Table

SQL TABLE SQL CREATE TABLE SQL ALTER TABLE SQL DELETE SQL TRUNCATE TABLE SQL UPDATE TABLE

SQL SELECT

SQL SELECT Statement SQL SELECT IN Operator SQL BETWEEN Operator SQL SELECT BETWEEN Operator SQL SELECT AND Operator SQL SELECT DISTINCT SQL SELECT SUM SQL SELECT MAX SQL SELECT MIN SQL SELECT AVG

SQL Clause

SQL GROUP BY CLAUSE SQL ORDER BY Clause SQL HAVING Clause

SQL INSERT

SQL INSERT INTO Statement

SQL JOIN

SQL JOIN SQL Inner Join SQL Left Join SQL Right Join

SQL OPERATOR

SQL Comparison SQL LOGICAL Operator SQL Arithmetic

Difference

SQL vs NOSQL WHERE vs HAVING DELETE vs DROP GROUP BY vs ORDER BY DROP vs TRUNCATE SQL IN vs SQL EXISTS

MISC

SQL SubQuery SQL CASE Commit and Rollback in SQL Pattern Matching in SQL DDL Commands in SQL DML Commands in SQL Types of SQL Commands SQL COUNT SQL Primary Key SQL FOREIGN KEY SET Operators in SQL Check Constraint in SQL SQL EXCEPT SQL VIEW SQL WHERE Statement SQL CRUD Operation Where Condition in SQL TCL Commands in SQL Types of SQL JOINS SQL Nth Highest Salary SQL NOT OPERATOR SQL UNION ALL SQL INTERSECT SQL Data Definition Language SQL Data Manipulation Language SQL Data Control Language SQL CONSTRAINTS SQL KEYS Codd’s Rules in SQL What is SQL Injection? Trigger In SQL SQL WHERE Multiple Conditions Truncate function in SQL SQL Formatter

How To

How to use the BETWEEN operator in SQL How To Use INNER JOIN In SQL How to use LIKE in SQL How to use HAVING Clause in SQL How to use GROUP BY Clause in SQL How To Remove Duplicates In SQL How To Delete A Row In SQL How to add column in table in SQL ? How to drop a column in SQL? How to create a database in SQL? How to use COUNT in SQL? How to Create Temporary Table in SQL? How to Add Foreign Key in SQL? How to Add Comments in SQL? How To Use Group By Clause In SQL How To Use Having Clause In SQL How To Delete Column In Table How To Compare Date In SQL

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 teacher_id=1;

UCASE() Function

The UCASE() function is used to return values in upper case of specified column. Syntax: Select Ucase(column_name) from table_name; Example: Select Ucase(teacher_name) from teacher;  Syntax: Select Ucase(column_name) from table_name [where condition]; Example: Select Ucase(teacher_name) from teacher where teacher_id=2;

MID() Function

The MID() function is used to return the substring. In syntax we have passed three parameters first is column name or string, second is position from where user want to start substring, and third specifies the length of substring. Syntax: Select Mid(column_name/’string’, position, length) From teacher; Example: Select teacher_name,Mid(teacher_name,2,6) From teacher; Syntax: Select Mid(column_name/’string’, position, length) From teacher Where condition; Example: Select Mid(teacher_name,2,6) From teacher Where teacher_id=7; Example: Select Mid(‘JAVA_T_POINT’,3,6); ;;  

ROUND() Function

The Round() function is used to return the round number values. Syntax: Select Round(column_name) from table_name; Example: Select Round(salary) from teacher; Syntax: Select Round (column_name) from table_name [where condition]; Example: Select Round (salary) from teacher where teacher_name=’monu vasu’;



ADVERTISEMENT
ADVERTISEMENT