MySQL Basic Commands For Beginners2 min read

uploads mysql mysql PNG1

If your are Thinking to Learn MySQL as a DBMS ( Database Management System ), MySQL Is a Good Option for You to Start With a DBMS. MySQL Is Easy to Learn & Uses Most of the English Words Which Any Non-Programmer Guy Can Understand.

What is a Database?

In computing, a database is an organized collection of data stored and accessed electronically from a Computer.

What is MySQL?

MySQL is an open-source relational database management system. Its name is a combination of “My”, the name of co-founder Michael Widenius’s daughter, and “SQL”, the abbreviation for Structured Query Language.

Some of the Basic MySQL Commands

  1. SELECT — Extracts Data from a Database
SELECT  table_name
 FROM table_name;

SELECT Satements Fetch Data from a Database.

2. UPDATE — updates Data in a Database

UPDATE table_name
SET any_column = any_value
WHERE any_column = any_value;

UPDATE Statements Allow Us to Edit Rows in a Table.

3. DELETE — Deletes Data From a Database

DELETE FROM table_name
WHERE any_column = any_value;

DELETE Statements Deletes or Removes the Data From a Database

4. INSERT INTO — Inserts New Data into a Database

INSERT INTO table_name (table_name1, table_name2, table_name3)
VALUES (value_1, ‘value_2’, value_3);

INSERT Statements Add a New Data to a Table.

5. CREATE DATABASE — Creates a New Database

CREATE DATABASE databasename;

CREATE DATABASE Statements Create a New MySQL database.

6. ALTER DATABASE — modifies a Database

ALTER DATABASE database_name

ALTER DATABASE Statements Change the Characteristics of a Database.

7. CREATE TABLE — Creates a New Table In MySQL

CREATE TABLE table_name ( column_1 datatype, column_2 datatype, column_3 datatype );

CREATE TABLE Statements Create a New Table in the Database.

8. ALTER TABLE — Modifies a Table

ALTER TABLE table_name
ADD column_name datatype;

ALTER TABLE Statements Add, Delete, or Modify Columns in an Existing Table.

9. DROP TABLE — Deletes a Table

DROP TABLE table_name;

DROP TABLE Statements Drop an Existing Table in a Database.

10. CREATE INDEX — Creates an Index

CREATE INDEX index_name
ON table_name (column_name1, column_name2);

Index statements create on existing tables to retrieve the rows quickly.

11. DROP INDEX — Deletes an Index

ALTER TABLE table_name
DROP INDEX index_name;

DROP INDEX Statements Delete or Drops an index in a table.

This is For It Programmer, See you In the Next One 🔥

Read Also: https://mrprogrammer.in/index.php/best-python-gui-framework-in-2022-for-beginners

Tanmay Sinha

Author

  • Tanmay Sinha

    Founder & CEO of MrProgrammer.in | I help Learning Freaks to Step into the World of Programming and Our Mission is to Provide High Quality and Valuable Content to Our Users! We believe that everyone has the potential to learn to code, and we are committed to making that happen. Our courses are designed to be engaging and interactive, and we offer a variety of learning paths to meet the needs of all learners. We are also committed to providing our learners with the support they need to succeed, and we offer a variety of resources to help learners learn at their own pace. If you are interested in learning to code, we encourage you to check out our courses. We are confident that you will find our content to be high-quality, valuable, and makes sense.

7 comments

Leave a Reply