1. MYSQL
Data Manipulation Language(DML)
:
1.SELECT extracts data from a database.
2.UPDATEupdate data from a database.
3.DELETE deletes data from a database.
4.INSERT INTO – inserts a new data into database
Select statements:
The Select statement is used to select data from a database.
Syntax
1.Select * from table_name
Eg:
Select * from person
2.Select column_name(s) from table
Eg:
Select lastname, firstname from person
Update Statement:
The update statement is used to update records in a table.
Syntax:
Update table_name set column1=value,column2=value2,...where
some_column=some_value
Eg:
Update Persons set Address='parrys', where LastName='kumar' and FirstName='kalpana'
Delete Statement:
The Delete statement is used to delete records in a table.
Syntax:
Delete from table_name where some_columns =some values
Eg:
Delete from Persons where LastName='viji' and FirstName='kavitha'
Insert Statement:
The Insert into statement is used to insert new records in a table.
Syntax
Insert into table_name values(value 1,value 2,value 3.........)
Eg:
Insert into Persons values('15','anu','kanna','minjur')
3. PHP MY ADMIN
Php MyAdmin supports a wide range of operations with MySQL. The most
frequently used operations are supported by the user interface (managing
databases, tables, fields, relations, indexes, users, permissions, etc), while you
still have the ability to directly execute any SQL statement.
Features:
1.Support for most MySQL features.
2.Import data from CSV and SQL
3.Administering multiple servers
4.Creating PDF graphics of your database layout
5.Creating complex queries using Query-by-example (QBE)
6.Searching globally in a database or a subset of it
7 .Transforming stored data into any format using a set of predefined functions,
like displaying BLOB-data as image or download-link
8.Export data to various formats: CSV, SQL, XML, PDF, ISO/IEC 26300 -
OpenDocument Text and Spreadsheet, Word, Excel, LATEX and others.
DCL:Data Control Language
1.COMMIT
SQL>COMMIT
This will commit (write to data base) the transcation done by DML
2.ROLLBACK
SQL>ROLLBACK
This will rollback the transactions and will not commit the changes to the database.
3.GRANT
Giving the permission to acess the user1's objects to user2.
Grant privilege on <object_name> to <user_ name>
Grant select,insert,delete,update on empdetails to m
PRIVILEGE:
It is the right to access another user's objects.
1.Grant Privilege:
Giving the permission to acess the user1's objects to user2.
Grant privilege on <object_name> to <user_ name>
Grant select,insert,delete,update on empdetails to main_dep
2.Revoke privilege:
Withdraw the privilege which has been granted to the user, we use the revoke command
Revoke privilege on <object_name> from <user_name>
Revoke select,insert,delete,update on emp details
from main_dep