SlideShare uma empresa Scribd logo
1 de 14
MySQL Is a  relational database management system  (RDBMS)  that runs as a server providing multi-user access to a number of databases. 1.Basic Queries 2.Porcedures and Functions 3.Imports and Exports
Basic Query Commands in MySQL CREATE Command   SELECT Command   DELETE Command   INSERT Command   UPDATE Command DROP Command
CREATE Command  The Create command is used to create a table by specifying the tablename, fieldnames and constraints as shown below : Syntax : $createSQL=("CREATE TABLE tblName");
SELECT Command The Select command is used to select the records from a table using its field names. To select all the fields in a table, '*' is used in the command. The result is assigned to a variable name as shown below: Syntax: $selectSQL=("SELECT field_names FROM tablename");
DELETE Command The Delete command is used to delete the records from a table using conditions as shown below: Syntax: $deleteSQL=("DELETE * FROM tablename WHERE condition");
INSERT Command The Insert command is used to insert records into a table. The values are assigned to the field names as shown below: Syntax: $insertSQL=("INSERT INTO tblname(fieldname1,fieldname2..) VALUES(value1,value2,...) ");
UPDATE Command The Update command is used to update the field values using conditions. This is done using 'SET' and the fieldnames to assign new values to them. Syntax: $updateSQL=("UPDATE Tblname SET (fieldname1=value1,fieldname2=value2,...) WHERE fldstudid=IdNumber"); .
DROP Command The Drop command is used to delete all the records in a table using the table name as shown below: Syntax: $dropSQL=("DROP tblName");
PROCEDURE AND FUNCTIONS Procedures  The procedure is a program that performs an action and does not return a value (outside of IN OUT and OUT parameters).  Functions The function is a program that might perform an action and does return a value.
A procedure is declared as:   CREATE OR REPLACE PROCEDURE()  AS BEGIN  END; Procedure Syntax
Functions Syntax A function is declared as :  CREATE OR REPLACE FUNCTION() RETURN  AS BEGIN RETURN  END;
It can be used to back up a database or to move database information from one server to another. It can be used to back up a database or to move database information from one server to another. It can be used to back up a database or to move database information from one server to another. IMPORT AND EXPORT
This example shows  how to export a database. It is a good idea to export the data often as a backup. # mysqldump -u username -ppassword database_name > FILE.sql  Replace username, password and database_name with your MySQL username, password and database name. 1.Export A MySQL Database:
Here, we import a database. Using this to restore data from a backup or to import from another MySQL server. Start by uploading the FILE.sql file to the server where we will be running this command. # mysql -u username -ppassword database_name < FILE.sql  2. Import A MySQL Database:

Mais conteúdo relacionado

Mais procurados

Mysqlppt
MysqlpptMysqlppt
Mysqlppt
Reka
 
Database presentation
Database presentationDatabase presentation
Database presentation
webhostingguy
 
MYSQL
MYSQLMYSQL
MYSQL
ARJUN
 

Mais procurados (20)

Les11 Including Constraints
Les11 Including ConstraintsLes11 Including Constraints
Les11 Including Constraints
 
My sql command line client
My sql command line clientMy sql command line client
My sql command line client
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
 
Oracle: DDL
Oracle: DDLOracle: DDL
Oracle: DDL
 
Oracle - Program with PL/SQL - Lession 18
Oracle - Program with PL/SQL - Lession 18Oracle - Program with PL/SQL - Lession 18
Oracle - Program with PL/SQL - Lession 18
 
Introduction to php database connectivity
Introduction to php  database connectivityIntroduction to php  database connectivity
Introduction to php database connectivity
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Database presentation
Database presentationDatabase presentation
Database presentation
 
Doctrine in FLOW3
Doctrine in FLOW3Doctrine in FLOW3
Doctrine in FLOW3
 
MYSQL
MYSQLMYSQL
MYSQL
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
 
Sql views, stored procedure, functions
Sql views, stored procedure, functionsSql views, stored procedure, functions
Sql views, stored procedure, functions
 
Oracle: DML
Oracle: DMLOracle: DML
Oracle: DML
 
Mapping and listing with mule
Mapping and listing with muleMapping and listing with mule
Mapping and listing with mule
 
Customizing the unix environment
Customizing the unix environmentCustomizing the unix environment
Customizing the unix environment
 
Mapping and listing in mule
Mapping and listing in muleMapping and listing in mule
Mapping and listing in mule
 
SQL Queries - DDL Commands
SQL Queries - DDL CommandsSQL Queries - DDL Commands
SQL Queries - DDL Commands
 
Oracle: PLSQL Commands
Oracle: PLSQL CommandsOracle: PLSQL Commands
Oracle: PLSQL Commands
 
PHP - Getting good with MySQL part II
 PHP - Getting good with MySQL part II PHP - Getting good with MySQL part II
PHP - Getting good with MySQL part II
 
Database Connectivity in PHP
Database Connectivity in PHPDatabase Connectivity in PHP
Database Connectivity in PHP
 

Destaque

DBMS lab manual
DBMS lab manualDBMS lab manual
DBMS lab manual
maha tce
 
Web app development_my_sql_08
Web app development_my_sql_08Web app development_my_sql_08
Web app development_my_sql_08
Hassen Poreya
 
Diva10
Diva10Diva10
Diva10
diva23
 
Execute MySQL query using command prompt
Execute MySQL query using command promptExecute MySQL query using command prompt
Execute MySQL query using command prompt
Ikhwan Krisnadi
 
lamp technology
lamp technologylamp technology
lamp technology
Deepa
 

Destaque (20)

working with database using mysql
working with database using mysql working with database using mysql
working with database using mysql
 
DBMS lab manual
DBMS lab manualDBMS lab manual
DBMS lab manual
 
Web app development_my_sql_08
Web app development_my_sql_08Web app development_my_sql_08
Web app development_my_sql_08
 
Mysql classes in navi-mumbai,mysql course-provider-in-navi-mumbai
Mysql classes in navi-mumbai,mysql course-provider-in-navi-mumbaiMysql classes in navi-mumbai,mysql course-provider-in-navi-mumbai
Mysql classes in navi-mumbai,mysql course-provider-in-navi-mumbai
 
Mysql
MysqlMysql
Mysql
 
Diva10
Diva10Diva10
Diva10
 
My sql
 My sql My sql
My sql
 
Execute MySQL query using command prompt
Execute MySQL query using command promptExecute MySQL query using command prompt
Execute MySQL query using command prompt
 
MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015
 
Beginner guide to mysql command line
Beginner guide to mysql command lineBeginner guide to mysql command line
Beginner guide to mysql command line
 
Mysql ppt
Mysql pptMysql ppt
Mysql ppt
 
DBMS Practical File
DBMS Practical FileDBMS Practical File
DBMS Practical File
 
Basic concepts for_clustered_data_ontap_8.3_v1.1-lab_guide
Basic concepts for_clustered_data_ontap_8.3_v1.1-lab_guideBasic concepts for_clustered_data_ontap_8.3_v1.1-lab_guide
Basic concepts for_clustered_data_ontap_8.3_v1.1-lab_guide
 
Mysql Ppt
Mysql PptMysql Ppt
Mysql Ppt
 
lamp technology
lamp technologylamp technology
lamp technology
 
Dbms
DbmsDbms
Dbms
 
MYSQL
MYSQLMYSQL
MYSQL
 
MySql slides (ppt)
MySql slides (ppt)MySql slides (ppt)
MySql slides (ppt)
 
EGL Conference 2011 - Technical Workshop
EGL Conference 2011 - Technical WorkshopEGL Conference 2011 - Technical Workshop
EGL Conference 2011 - Technical Workshop
 
CBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL PresentationCBSE XII Database Concepts And MySQL Presentation
CBSE XII Database Concepts And MySQL Presentation
 

Semelhante a My sql

My sql with querys
My sql with querysMy sql with querys
My sql with querys
NIRMAL FELIX
 
Creating database using sql commands
Creating database using sql commandsCreating database using sql commands
Creating database using sql commands
Belle Wx
 
SQL.pptx for the begineers and good know
SQL.pptx for the begineers and good knowSQL.pptx for the begineers and good know
SQL.pptx for the begineers and good know
PavithSingh
 

Semelhante a My sql (20)

My sql.ppt
My sql.pptMy sql.ppt
My sql.ppt
 
Raj mysql
Raj mysqlRaj mysql
Raj mysql
 
My sql with querys
My sql with querysMy sql with querys
My sql with querys
 
STRUCTURED QUERY LANGUAGE
STRUCTURED QUERY LANGUAGESTRUCTURED QUERY LANGUAGE
STRUCTURED QUERY LANGUAGE
 
MySQL
MySQLMySQL
MySQL
 
Database COMPLETE
Database COMPLETEDatabase COMPLETE
Database COMPLETE
 
Msql
Msql Msql
Msql
 
Lab
LabLab
Lab
 
Creating database using sql commands
Creating database using sql commandsCreating database using sql commands
Creating database using sql commands
 
Sql
SqlSql
Sql
 
COMPUTERS SQL
COMPUTERS SQL COMPUTERS SQL
COMPUTERS SQL
 
SQL.pptx for the begineers and good know
SQL.pptx for the begineers and good knowSQL.pptx for the begineers and good know
SQL.pptx for the begineers and good know
 
Oracle notes
Oracle notesOracle notes
Oracle notes
 
Learning sql from w3schools
Learning sql from w3schoolsLearning sql from w3schools
Learning sql from w3schools
 
PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slides
 
Module 3
Module 3Module 3
Module 3
 
Mysql
MysqlMysql
Mysql
 
MySQL Essential Training
MySQL Essential TrainingMySQL Essential Training
MySQL Essential Training
 
Sql 2006
Sql 2006Sql 2006
Sql 2006
 
8. sql
8. sql8. sql
8. sql
 

Último

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

My sql

  • 1. MySQL Is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. 1.Basic Queries 2.Porcedures and Functions 3.Imports and Exports
  • 2. Basic Query Commands in MySQL CREATE Command SELECT Command DELETE Command INSERT Command UPDATE Command DROP Command
  • 3. CREATE Command The Create command is used to create a table by specifying the tablename, fieldnames and constraints as shown below : Syntax : $createSQL=(&quot;CREATE TABLE tblName&quot;);
  • 4. SELECT Command The Select command is used to select the records from a table using its field names. To select all the fields in a table, '*' is used in the command. The result is assigned to a variable name as shown below: Syntax: $selectSQL=(&quot;SELECT field_names FROM tablename&quot;);
  • 5. DELETE Command The Delete command is used to delete the records from a table using conditions as shown below: Syntax: $deleteSQL=(&quot;DELETE * FROM tablename WHERE condition&quot;);
  • 6. INSERT Command The Insert command is used to insert records into a table. The values are assigned to the field names as shown below: Syntax: $insertSQL=(&quot;INSERT INTO tblname(fieldname1,fieldname2..) VALUES(value1,value2,...) &quot;);
  • 7. UPDATE Command The Update command is used to update the field values using conditions. This is done using 'SET' and the fieldnames to assign new values to them. Syntax: $updateSQL=(&quot;UPDATE Tblname SET (fieldname1=value1,fieldname2=value2,...) WHERE fldstudid=IdNumber&quot;); .
  • 8. DROP Command The Drop command is used to delete all the records in a table using the table name as shown below: Syntax: $dropSQL=(&quot;DROP tblName&quot;);
  • 9. PROCEDURE AND FUNCTIONS Procedures The procedure is a program that performs an action and does not return a value (outside of IN OUT and OUT parameters). Functions The function is a program that might perform an action and does return a value.
  • 10. A procedure is declared as: CREATE OR REPLACE PROCEDURE() AS BEGIN END; Procedure Syntax
  • 11. Functions Syntax A function is declared as : CREATE OR REPLACE FUNCTION() RETURN AS BEGIN RETURN END;
  • 12. It can be used to back up a database or to move database information from one server to another. It can be used to back up a database or to move database information from one server to another. It can be used to back up a database or to move database information from one server to another. IMPORT AND EXPORT
  • 13. This example shows  how to export a database. It is a good idea to export the data often as a backup. # mysqldump -u username -ppassword database_name > FILE.sql Replace username, password and database_name with your MySQL username, password and database name. 1.Export A MySQL Database:
  • 14. Here, we import a database. Using this to restore data from a backup or to import from another MySQL server. Start by uploading the FILE.sql file to the server where we will be running this command. # mysql -u username -ppassword database_name < FILE.sql 2. Import A MySQL Database: