SQL AND & OR Operators

We can link multiple WHERE statements by AND/OR statements. AND means that all the conditions are TRUE. OR means, at least, one condition is TRUE.   For example,...

SQL SELECT Statement

The SELECT statement tells what is to be returned. ‘*’means all the columns from all tables in the from statement are to be returned.   Syntax: For...

SQL UNIQUE Constraint

This unique constraint identifies each record in a table. A PRIMARY KEY constraint itself defines UNIQUE constraint. The basic difference between UNIQUE and PRIMARY...

SQL Having Clause

SQL Having Clause Having clause is used to mention condition in Group based SQL functions, just like WHERE clause. It acts in the same way...

SQL Distinct Keyword

SQL Distinct Keyword The SQL Distinct Keyword is mainly used with the Select statement in order to get unique values from the desired table. Distinct removes all the...

SQL Create Table

SQL CREATE TABLE Create is used to define new tables. Syntax : The above syntax can be used for creating tables with the primary key. Here field1...

SQL Temporary Tables

The temporary tables could be exceptionally valuable at times to keep transitory information. An essential thing that ought to be known for impermanent tables...

SQL LIKE Clause

A “where” command is used when a user wants the exact result. For example, a user wants to search for the name Rajat Sharma then...

SQL GROUP BY Statement

The SQL Group by statement is used to group the results of a SELECT query based on one or more columns.   The syntax for using...

SQL Delete Statement

If you want to delete a record from any MySQL table, then you can use SQL DELETE Statement. 1.)command at mysql> prompt 2.) any script like...

SQL ALTER Table Statement

Using ALTER Table Statement, we were able to Add, Delete or Modify Columns in an existing table. Syntax to add a column: Syntax to drop a...

SQL INSERT INTO Statement

A user can insert the data into a MySQL table using SQL INSERT INTO command. It can be done in two ways:- 1.) By using...

SQL Drop Table

SQL Drop Table MySql Drop Table declaration allow deleting tables from the MySql Database. After dropping tables, it removed all of its data permanently by...

SQL Regular Expressions

SQL Regular Expressions Following is the table of pattern, which can be used along with REGEXP operator in a query for a selected table in the database. Pattern What...

SQL UPDATE Statement

A user can do so by using SQL UPDATE Statement. This will help in modifying any field value of any MySQL table in a given database....

SQL ORDER BY keyword

ORDER BY used to define how the records are to be sorted. By default, it is to order in ascending order(ASC). If we want to sort in...