SlideShare a Scribd company logo
MY SQL  INTRODUCTION  TO LOGIN  BASIC COMMANDS  OTHER COMMANDS
INTRODUCTION MySQL is a key part of LAMP (Linux, Apache, MySQL, PHP / Perl / Python), the fast-growing open source enterprise software stack. More and more companies are using LAMP as an alternative to expensive proprietary software stacks because of its lower cost and freedom from platform lock-in. MySQL was originally founded and developed in Sweden by two Swedes and a Finn: David Axmark, Allan Larsson and Michael "Monty" Widenius, who had worked together since the 1980's.
TO LOGIN  To login (from unix shell) use -h only if needed.the command used to login is  [mysql dir]/bin/mysql -h hostname -u root -p
DDL COMMANDS DDL is abbreviation of Data Definition Language. It is used to create and modify the structure of database objects in database. Examples:   CREATE, ALTER, DROP statements
CREATE Creates objects in the database the queery used to create theobject is create database [databasename]; Example : create database [employee];
ALTER Alters objects of the database ALTER TABLE <table_name> ADD <column_name1> <datatype1> <constraint1> ALTER TABLE <table_name> ALTER COLUMN <column_name1> <datatype1> <constraint1> ALTER TABLE <table_name> DROP COLUMN <column_name1> <datatype1>
DROP Deletes objects of the database  the syntax for dorp is DROP TABLE [ IF EXISTS ] table_name1, table_name2, ....   Removes the table(s) from the database. The IF EXISTS clause will drop the table only if it exists. If this clause is not present an error is generated if the table does not exist. Any data that was in a dropped table is lost so use with care.
DML COMMANDS DML is abbreviation of Data Manipulation Language. It is used to retrieve, store, modify, delete, insert and update data in database. Examples:   SELECT, UPDATE, INSERT statements
SELECT SELECT [ DISTINCT | ALL ] column_expression1, column_expression2, .... [ FROM from_clause ] [ WHERE where_expression ] [ GROUP BY expression1, expression2, .... ] [ HAVING having_expression ] [ ORDER BY order_column_expr1, order_column_expr2, .... ] The SELECT statement is used to form queries for extracting information out of the database. The following example query will return the number, quantity and price of all orders for more than 5 items sorted in descending order by order number.  to the output.
UPDATE  UPDATE table_name SET col_name1 = expression1, col_name2 = expres sion2, .... [ WHERE expression ] [ LIMIT limit_amount ] Updates information in a table. The SET clause is a list of assignments that describe how the columns of the data matched by the WHERE clause are to be updated.
INSERT INSERT INTO table_name [ ( col_name1,  col_name2, .... ) ] VALUES ( expression1_1, expression1_2, .... ), ( expression2_1, expression2_2, .... ), ....  This is the SQL command to insert records into a table in the database. This statement comes in three forms.
The Second form of insert command INSERT INTO table_name [ ( col_name1,  col_name2, .... ) ] SELECT ...  The Third form of insert cmmand INSERT INTO table_name SET col_name1 = expression1, col_name2 =  expression2, ....
TCL COMMSNDS TCL is abbreviation of Transactional Control Language. It is used to manage different transactions occurring within a database. Examples:  COMMIT, ROLLBACK statements
COMMIT AND ROLLBACK Saves work done in transactions The Syntax COMMIT ROLLBACK Transactional operations for closing a transaction and either committing all the changes made or rolling back and disposing all changes
DCL COMMANDS DCL is abbreviation of Data Control Language. It is used to create roles, permissions, and referential integrity as well it is used to control access to database by securing it. Examples: GRANT, REVOKE statements
GRANT AND REVOKE GRANT privileges ON database_object TO  ( PUBLIC | user_list )‏ [ WITH GRANT OPTION ] REVOKE [ GRANT OPTION FOR ] privi- leges ON database_object FROM ( PUBLIC | user_list )‏ Grants or revokes types of access on a table or view to a user. When a table or view is created the system gives full grant options to the user that created the object.
OTHER COMMANDS SET  SET variable = expression SET AUTO COMMIT ( ON | OFF )‏ SET TRANSACTION ISOLATION LEVEL  ( SERIALIZABLE )‏ SET SCHEMA schema_name Makes a change to the state of the connection. SET AUTO COMMIT is used to switch transaction 'auto commit mode' on or off.
DESCRIBE  SYNTAX  DESCRIBE table_name This command provides information about the columns of the table. It shows the column names, the type / size and scale (if applicable) and other useful information.
SHOW  SHOW engine_variable engine_variable ::= TABLES | SCHEMA | STATUS | CONNECTIONS Shows internal information about the database system. SHOW TABLES returns a list of tables in the database. SHOW STATUS returns debugging and statistical information about the internal state of the database engine. SHOW CONNECTIONS returns a snapshot of the current connections on the database. SHOW SCHEMA lists all the schema defined.
SHUTDOWN SYNTAX SHUTDOWN Shuts down the database. If the database is running as a server the database shuts down cleanly and the process is stopped. If the database is embedded in a Java application it is cleanly put into a shut down state.
THANK YOU
Ad

More Related Content

What's hot (20)

Sql ppt
Sql pptSql ppt
Sql ppt
Prof. Dr. K. Adisesha
 
Sql - Structured Query Language
Sql - Structured Query LanguageSql - Structured Query Language
Sql - Structured Query Language
Wan Hussain Wan Ishak
 
SQL - DML and DDL Commands
SQL - DML and DDL CommandsSQL - DML and DDL Commands
SQL - DML and DDL Commands
Shrija Madhu
 
SQL
SQLSQL
SQL
Vineeta Garg
 
Structured query language(sql)ppt
Structured query language(sql)pptStructured query language(sql)ppt
Structured query language(sql)ppt
Gowarthini
 
SQL Overview
SQL OverviewSQL Overview
SQL Overview
Stewart Rogers
 
5. stored procedure and functions
5. stored procedure and functions5. stored procedure and functions
5. stored procedure and functions
Amrit Kaur
 
SQL : introduction
SQL : introductionSQL : introduction
SQL : introduction
Shakila Mahjabin
 
Sql commands
Sql commandsSql commands
Sql commands
Pooja Dixit
 
Introduction to-sql
Introduction to-sqlIntroduction to-sql
Introduction to-sql
BG Java EE Course
 
MySql:Introduction
MySql:IntroductionMySql:Introduction
MySql:Introduction
DataminingTools Inc
 
Sql operator
Sql operatorSql operator
Sql operator
Pooja Dixit
 
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Structured Query Language (SQL) - Lecture 5 - Introduction to Databases (1007...
Beat Signer
 
NoSql
NoSqlNoSql
NoSql
Girish Khanzode
 
Sql ppt
Sql pptSql ppt
Sql ppt
Anuja Lad
 
Sql commands
Sql commandsSql commands
Sql commands
Balakumaran Arunachalam
 
Chapter 4 Structured Query Language
Chapter 4 Structured Query LanguageChapter 4 Structured Query Language
Chapter 4 Structured Query Language
Eddyzulham Mahluzydde
 
Getting Started with MySQL I
Getting Started with MySQL IGetting Started with MySQL I
Getting Started with MySQL I
Sankhya_Analytics
 
Mysql
MysqlMysql
Mysql
TSUBHASHRI
 
SQL Commands
SQL Commands SQL Commands
SQL Commands
Sachidananda M H
 

Viewers also liked (20)

MySql slides (ppt)
MySql slides (ppt)MySql slides (ppt)
MySql slides (ppt)
webhostingguy
 
MySQL Transactions
MySQL TransactionsMySQL Transactions
MySQL Transactions
Reggie Niccolo Santos
 
Introduction to Mysql
Introduction to MysqlIntroduction to Mysql
Introduction to Mysql
Tushar Chauhan
 
Mysql ppt
Mysql pptMysql ppt
Mysql ppt
Sanmuga Nathan
 
MySQL Atchitecture and Concepts
MySQL Atchitecture and ConceptsMySQL Atchitecture and Concepts
MySQL Atchitecture and Concepts
Tuyen Vuong
 
Transaction in MYSQL
Transaction in MYSQLTransaction in MYSQL
Transaction in MYSQL
baabtra.com - No. 1 supplier of quality freshers
 
UNIFAL - MySQL Transações - 5.0/5.6
UNIFAL - MySQL Transações - 5.0/5.6UNIFAL - MySQL Transações - 5.0/5.6
UNIFAL - MySQL Transações - 5.0/5.6
Wagner Bianchi
 
Build and deploy scientific Python Applications
Build and deploy scientific Python Applications  Build and deploy scientific Python Applications
Build and deploy scientific Python Applications
Ramakrishna Reddy
 
Linux
Linux Linux
Linux
Hema Prasanth
 
web programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Malothweb programming UNIT VIII python by Bhavsingh Maloth
web programming UNIT VIII python by Bhavsingh Maloth
Bhavsingh Maloth
 
PythonIntro_pycon2010
PythonIntro_pycon2010PythonIntro_pycon2010
PythonIntro_pycon2010
Kannappan Sirchabesan
 
Tutorial on-python-programming
Tutorial on-python-programmingTutorial on-python-programming
Tutorial on-python-programming
Chetan Giridhar
 
MySQL database
MySQL databaseMySQL database
MySQL database
lalit choudhary
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
WordPress Memphis
 
Php Ppt
Php PptPhp Ppt
Php Ppt
Hema Prasanth
 
Web 2 0 Ppt
Web 2 0 PptWeb 2 0 Ppt
Web 2 0 Ppt
Hema Prasanth
 
Linux basic commands
Linux basic commandsLinux basic commands
Linux basic commands
MohanKumar Palanichamy
 
Mysql an introduction
Mysql an introductionMysql an introduction
Mysql an introduction
Mohd yasin Karim
 
MySQL Features & Implementation
MySQL Features & ImplementationMySQL Features & Implementation
MySQL Features & Implementation
OSSCube
 
MySQL DBA
MySQL DBAMySQL DBA
MySQL DBA
lalit choudhary
 
Ad

Similar to Mysql Ppt (20)

My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptxMy lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
EliasPetros
 
lovely
lovelylovely
lovely
love0323
 
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptxhjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
EliasPetros
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
Reka
 
SQl data base management and design
SQl     data base management  and designSQl     data base management  and design
SQl data base management and design
franckelsania20
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
poornima sugumaran
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
poornima sugumaran
 
Oracle 11g SQL Overview
Oracle 11g SQL OverviewOracle 11g SQL Overview
Oracle 11g SQL Overview
Prathap Narayanappa
 
SQL Query
SQL QuerySQL Query
SQL Query
Imam340267
 
Introduction to sql new
Introduction to sql newIntroduction to sql new
Introduction to sql new
SANTOSH RATH
 
Oracle sql material
Oracle sql materialOracle sql material
Oracle sql material
prathap kumar
 
Dbms
DbmsDbms
Dbms
Sachin Yadav
 
COMPUTERS SQL
COMPUTERS SQL COMPUTERS SQL
COMPUTERS SQL
Rc Os
 
Getting Started with SQL Language.pptx
Getting Started with SQL Language.pptxGetting Started with SQL Language.pptx
Getting Started with SQL Language.pptx
Cecilia Brusatori
 
Sql tutorial
Sql tutorialSql tutorial
Sql tutorial
amitabros
 
Sql smart reference_by_prasad
Sql smart reference_by_prasadSql smart reference_by_prasad
Sql smart reference_by_prasad
paddu123
 
Sql smart reference_by_prasad
Sql smart reference_by_prasadSql smart reference_by_prasad
Sql smart reference_by_prasad
paddu123
 
Lesson 2_Working_with_Tables_and_SQL_Commands.pptx
Lesson 2_Working_with_Tables_and_SQL_Commands.pptxLesson 2_Working_with_Tables_and_SQL_Commands.pptx
Lesson 2_Working_with_Tables_and_SQL_Commands.pptx
quantumlearnai
 
Adbms
AdbmsAdbms
Adbms
jass12345
 
Introduction to database and sql fir beginers
Introduction to database and sql fir beginersIntroduction to database and sql fir beginers
Introduction to database and sql fir beginers
reshmi30
 
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptxMy lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
My lablkxjlkxjcvlxkcjvlxckjvlxck ppt.pptx
EliasPetros
 
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptxhjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
hjkjlboiupoiuuouoiuoiuoiuoiuoiuoippt.pptx
EliasPetros
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
Reka
 
SQl data base management and design
SQl     data base management  and designSQl     data base management  and design
SQl data base management and design
franckelsania20
 
Introduction to sql new
Introduction to sql newIntroduction to sql new
Introduction to sql new
SANTOSH RATH
 
COMPUTERS SQL
COMPUTERS SQL COMPUTERS SQL
COMPUTERS SQL
Rc Os
 
Getting Started with SQL Language.pptx
Getting Started with SQL Language.pptxGetting Started with SQL Language.pptx
Getting Started with SQL Language.pptx
Cecilia Brusatori
 
Sql tutorial
Sql tutorialSql tutorial
Sql tutorial
amitabros
 
Sql smart reference_by_prasad
Sql smart reference_by_prasadSql smart reference_by_prasad
Sql smart reference_by_prasad
paddu123
 
Sql smart reference_by_prasad
Sql smart reference_by_prasadSql smart reference_by_prasad
Sql smart reference_by_prasad
paddu123
 
Lesson 2_Working_with_Tables_and_SQL_Commands.pptx
Lesson 2_Working_with_Tables_and_SQL_Commands.pptxLesson 2_Working_with_Tables_and_SQL_Commands.pptx
Lesson 2_Working_with_Tables_and_SQL_Commands.pptx
quantumlearnai
 
Introduction to database and sql fir beginers
Introduction to database and sql fir beginersIntroduction to database and sql fir beginers
Introduction to database and sql fir beginers
reshmi30
 
Ad

Recently uploaded (20)

Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-3-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-3-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 
Operations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdfOperations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdf
Arab Academy for Science, Technology and Maritime Transport
 
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Marie Boran Special Collections Librarian Hardiman Library, University of Gal...
Library Association of Ireland
 
GDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptxGDGLSPGCOER - Git and GitHub Workshop.pptx
GDGLSPGCOER - Git and GitHub Workshop.pptx
azeenhodekar
 
How to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of saleHow to manage Multiple Warehouses for multiple floors in odoo point of sale
How to manage Multiple Warehouses for multiple floors in odoo point of sale
Celine George
 
Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025Stein, Hunt, Green letter to Congress April 2025
Stein, Hunt, Green letter to Congress April 2025
Mebane Rash
 
Anti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptxAnti-Depressants pharmacology 1slide.pptx
Anti-Depressants pharmacology 1slide.pptx
Mayuri Chavan
 
New Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptxNew Microsoft PowerPoint Presentation.pptx
New Microsoft PowerPoint Presentation.pptx
milanasargsyan5
 
To study the nervous system of insect.pptx
To study the nervous system of insect.pptxTo study the nervous system of insect.pptx
To study the nervous system of insect.pptx
Arshad Shaikh
 
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACYUNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
UNIT 3 NATIONAL HEALTH PROGRAMMEE. SOCIAL AND PREVENTIVE PHARMACY
DR.PRISCILLA MARY J
 
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar RabbiPresentation on Tourism Product Development By Md Shaifullar Rabbi
Presentation on Tourism Product Development By Md Shaifullar Rabbi
Md Shaifullar Rabbi
 
How to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POSHow to Manage Opening & Closing Controls in Odoo 17 POS
How to Manage Opening & Closing Controls in Odoo 17 POS
Celine George
 
Understanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s GuideUnderstanding P–N Junction Semiconductors: A Beginner’s Guide
Understanding P–N Junction Semiconductors: A Beginner’s Guide
GS Virdi
 
Unit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdfUnit 6_Introduction_Phishing_Password Cracking.pdf
Unit 6_Introduction_Phishing_Password Cracking.pdf
KanchanPatil34
 
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...Multi-currency in odoo accounting and Update exchange rates automatically in ...
Multi-currency in odoo accounting and Update exchange rates automatically in ...
Celine George
 
Social Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy StudentsSocial Problem-Unemployment .pptx notes for Physiotherapy Students
Social Problem-Unemployment .pptx notes for Physiotherapy Students
DrNidhiAgarwal
 
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Niamh Lucey, Mary Dunne. Health Sciences Libraries Group (LAI). Lighting the ...
Library Association of Ireland
 
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
World war-1(Causes & impacts at a glance) PPT by Simanchala Sarab(BABed,sem-4...
larencebapu132
 
How to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 WebsiteHow to Subscribe Newsletter From Odoo 18 Website
How to Subscribe Newsletter From Odoo 18 Website
Celine George
 
Metamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative JourneyMetamorphosis: Life's Transformative Journey
Metamorphosis: Life's Transformative Journey
Arshad Shaikh
 

Mysql Ppt

  • 1. MY SQL INTRODUCTION TO LOGIN BASIC COMMANDS OTHER COMMANDS
  • 2. INTRODUCTION MySQL is a key part of LAMP (Linux, Apache, MySQL, PHP / Perl / Python), the fast-growing open source enterprise software stack. More and more companies are using LAMP as an alternative to expensive proprietary software stacks because of its lower cost and freedom from platform lock-in. MySQL was originally founded and developed in Sweden by two Swedes and a Finn: David Axmark, Allan Larsson and Michael &quot;Monty&quot; Widenius, who had worked together since the 1980's.
  • 3. TO LOGIN To login (from unix shell) use -h only if needed.the command used to login is [mysql dir]/bin/mysql -h hostname -u root -p
  • 4. DDL COMMANDS DDL is abbreviation of Data Definition Language. It is used to create and modify the structure of database objects in database. Examples: CREATE, ALTER, DROP statements
  • 5. CREATE Creates objects in the database the queery used to create theobject is create database [databasename]; Example : create database [employee];
  • 6. ALTER Alters objects of the database ALTER TABLE <table_name> ADD <column_name1> <datatype1> <constraint1> ALTER TABLE <table_name> ALTER COLUMN <column_name1> <datatype1> <constraint1> ALTER TABLE <table_name> DROP COLUMN <column_name1> <datatype1>
  • 7. DROP Deletes objects of the database the syntax for dorp is DROP TABLE [ IF EXISTS ] table_name1, table_name2, .... Removes the table(s) from the database. The IF EXISTS clause will drop the table only if it exists. If this clause is not present an error is generated if the table does not exist. Any data that was in a dropped table is lost so use with care.
  • 8. DML COMMANDS DML is abbreviation of Data Manipulation Language. It is used to retrieve, store, modify, delete, insert and update data in database. Examples: SELECT, UPDATE, INSERT statements
  • 9. SELECT SELECT [ DISTINCT | ALL ] column_expression1, column_expression2, .... [ FROM from_clause ] [ WHERE where_expression ] [ GROUP BY expression1, expression2, .... ] [ HAVING having_expression ] [ ORDER BY order_column_expr1, order_column_expr2, .... ] The SELECT statement is used to form queries for extracting information out of the database. The following example query will return the number, quantity and price of all orders for more than 5 items sorted in descending order by order number. to the output.
  • 10. UPDATE UPDATE table_name SET col_name1 = expression1, col_name2 = expres sion2, .... [ WHERE expression ] [ LIMIT limit_amount ] Updates information in a table. The SET clause is a list of assignments that describe how the columns of the data matched by the WHERE clause are to be updated.
  • 11. INSERT INSERT INTO table_name [ ( col_name1, col_name2, .... ) ] VALUES ( expression1_1, expression1_2, .... ), ( expression2_1, expression2_2, .... ), .... This is the SQL command to insert records into a table in the database. This statement comes in three forms.
  • 12. The Second form of insert command INSERT INTO table_name [ ( col_name1, col_name2, .... ) ] SELECT ... The Third form of insert cmmand INSERT INTO table_name SET col_name1 = expression1, col_name2 = expression2, ....
  • 13. TCL COMMSNDS TCL is abbreviation of Transactional Control Language. It is used to manage different transactions occurring within a database. Examples: COMMIT, ROLLBACK statements
  • 14. COMMIT AND ROLLBACK Saves work done in transactions The Syntax COMMIT ROLLBACK Transactional operations for closing a transaction and either committing all the changes made or rolling back and disposing all changes
  • 15. DCL COMMANDS DCL is abbreviation of Data Control Language. It is used to create roles, permissions, and referential integrity as well it is used to control access to database by securing it. Examples: GRANT, REVOKE statements
  • 16. GRANT AND REVOKE GRANT privileges ON database_object TO ( PUBLIC | user_list )‏ [ WITH GRANT OPTION ] REVOKE [ GRANT OPTION FOR ] privi- leges ON database_object FROM ( PUBLIC | user_list )‏ Grants or revokes types of access on a table or view to a user. When a table or view is created the system gives full grant options to the user that created the object.
  • 17. OTHER COMMANDS SET SET variable = expression SET AUTO COMMIT ( ON | OFF )‏ SET TRANSACTION ISOLATION LEVEL ( SERIALIZABLE )‏ SET SCHEMA schema_name Makes a change to the state of the connection. SET AUTO COMMIT is used to switch transaction 'auto commit mode' on or off.
  • 18. DESCRIBE SYNTAX DESCRIBE table_name This command provides information about the columns of the table. It shows the column names, the type / size and scale (if applicable) and other useful information.
  • 19. SHOW SHOW engine_variable engine_variable ::= TABLES | SCHEMA | STATUS | CONNECTIONS Shows internal information about the database system. SHOW TABLES returns a list of tables in the database. SHOW STATUS returns debugging and statistical information about the internal state of the database engine. SHOW CONNECTIONS returns a snapshot of the current connections on the database. SHOW SCHEMA lists all the schema defined.
  • 20. SHUTDOWN SYNTAX SHUTDOWN Shuts down the database. If the database is running as a server the database shuts down cleanly and the process is stopped. If the database is embedded in a Java application it is cleanly put into a shut down state.