https://github.com/theanujsinha01/mysql
MySQL is a database system used to store and manage data in a structured way. It uses SQL (Structured Query Language) to interact with data.
https://github.com/theanujsinha01/mysql
database dbms mysql table
Last synced: 2 months ago
JSON representation
MySQL is a database system used to store and manage data in a structured way. It uses SQL (Structured Query Language) to interact with data.
- Host: GitHub
- URL: https://github.com/theanujsinha01/mysql
- Owner: theanujsinha01
- Created: 2025-02-07T11:14:09.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-05T11:22:44.000Z (over 1 year ago)
- Last Synced: 2025-03-05T12:26:35.850Z (over 1 year ago)
- Topics: database, dbms, mysql, table
- Homepage:
- Size: 426 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MySQL
## 📌 Introduction
This repository contains basic MySQL commands and queries to help beginners understand how to work with MySQL databases.
## 📂 Table of Contents
- [Installation](#installation)
- [Basic Commands](#basic-commands)
- [Creating a Database](#creating-a-database)
- [Creating a Table](#creating-a-table)
- [Inserting Data](#inserting-data)
- [Fetching Data](#fetching-data)
- [Updating Data](#updating-data)
- [Deleting Data](#deleting-data)
## 🛠Installation
1. Download and install [MySQL](https://dev.mysql.com/downloads/).
2. Open MySQL command line or any GUI tool (like MySQL Workbench).
## 🔹 Basic Commands
```sql
SHOW DATABASES; -- Show all databases
USE mydb; -- Select a database
SHOW TABLES; -- Show tables in selected database
```
## 📌 Creating a Database
```sql
CREATE DATABASE mydb;
```
## 📌 Creating a Table
```sql
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(50),
age INT
);
```
## 📌 Inserting Data
```sql
INSERT INTO users (name, age) VALUES ('Anuj', 22);
```
## 📌 Fetching Data
```sql
SELECT * FROM users;
```
## 📌 Updating Data
```sql
UPDATE users SET age = 23 WHERE name = 'Anuj';
```
## 📌 Deleting Data
```sql
DELETE FROM users WHERE name = 'Anuj';
```