SQL - LEARNING PHP AND MYSQL (2015)

LEARNING PHP AND MYSQL (2015)

SQL

SQL stands for standard query language which is used to access databases. It also used to manipulate database and it is an ANSI standard. MySQL is the widely used open source Relational database management system. MySQL is generally RDBMS being used for developing web-based software applications and you can add SQL queries to the MySQL database to insert, retrieve, update or delete data.

mysql.png

Logo of MySQL

History

· It was developed in 1970 at IBM with Donald D. Chamberlin and Raymond F. Boyce.

· It was first named as SEQUEL.

· This was sold to US NAVY, C.I.A and U.S. Government agencies after its potential was recognized.

Uses of SQL

· Used to execute query against database.

· To retrieve a data from database.

· To insert record.

· To update record.

· To delete record.

· To create a new database.

· To create new tables in database.

· To create various storage procedures in database.

· To create various kind of views in a database.

· To create permissions for the functioning of various procedures on tables and views.

How to use SQL in website

· One of the RDMS PROGRAM.

· Use of PHP or ASP.

· Use of SQL for the data to be retrieved.

· Use HTML/CSS.

Most important SQL command

· Select – To extract any needed or desired record or data from database.

· Update – To update or modify any data in the database.

· Delete – To delete or remove any data from database.

· Insert into – To add or insert into database.

· Create database – To create or start a new database.

· Alter database – To modify or edit database.

· Drop table – To remove or delete a table in database.

· Creates index – To create a new index.

· Drop index- To remove or delete an index.

Syntax of SQL

SELECT *FROM Customers;

SQL is not case sensitive. This means both select and SELECT have the same meaning.

Various language elements of SQL languages

· Clauses

· Expression

· Predicate

· Query

· Statement

· Insignificant white space

language-elements.png

Language elements of SQL