Skip to content

๐Ÿ“™ We explored accessing MySQL data using JavaScript. By connecting JavaScript and MySQL through libraries, we can easily retrieve and manipulate data for web applications. Course Material for For C-11.

Notifications You must be signed in to change notification settings

jsohndata/intro-mysql-with-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Course: Introduction to MySQL

An introduction to MySQL, covering basic commands such as creating tables, inserting data, and performing CRUD operations.

To enter mysql

mysql -u root -p


Create a database

CREATE DATABASE c11mysql;


Use the database

USE c11mysql;


Show Databases

SHOW DATABASES;


Show Tables

SHOW TABLES;


Describe Table

DESCRIBE table_name;


to escape command

\c


select all data from table

SELECT * FROM table_name;


select total count from table

SELECT COUNT(*) FROM table_name;


select specific data from table

SELECT columnname1, columnname2
  FROM table_name;

select specific data from table with condition

SELECT columnname1
  FROM table_name 
  WHERE columnname1 = 'value';

UPDATE table_name 
  SET columnname1 = 'value' 
  WHERE columnname1 = 'value';

DELETE 
  FROM table_name 
  WHERE columnname1 = 'value';

Start id from zero

TRUNCATE table_name;


Exit mysql

EXIT;

About

๐Ÿ“™ We explored accessing MySQL data using JavaScript. By connecting JavaScript and MySQL through libraries, we can easily retrieve and manipulate data for web applications. Course Material for For C-11.

Topics

Resources

Stars

Watchers

Forks