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 (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

working with database using mysql
working with database using mysql working with database using mysql
working with database using mysql Subhasis Nayak
 
DBMS lab manual
DBMS lab manualDBMS lab manual
DBMS lab manualmaha tce
 
Web app development_my_sql_08
Web app development_my_sql_08Web app development_my_sql_08
Web app development_my_sql_08Hassen Poreya
 
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-mumbaianshkhurana01
 
Diva10
Diva10Diva10
Diva10diva23
 
Execute MySQL query using command prompt
Execute MySQL query using command promptExecute MySQL query using command prompt
Execute MySQL query using command promptIkhwan Krisnadi
 
MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015MySQL Utilities -- PyTexas 2015
MySQL Utilities -- PyTexas 2015Dave Stokes
 
Beginner guide to mysql command line
Beginner guide to mysql command lineBeginner guide to mysql command line
Beginner guide to mysql command linePriti Solanki
 
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_guideVikas Sharma
 
lamp technology
lamp technologylamp technology
lamp technologyDeepa
 
EGL Conference 2011 - Technical Workshop
EGL Conference 2011 - Technical WorkshopEGL Conference 2011 - Technical Workshop
EGL Conference 2011 - Technical WorkshopWill Smythe
 
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 PresentationGuru Ji
 

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

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

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.pdfUK Journal
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
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 Scriptwesley chun
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Último (20)

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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

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: