How To Create A Table in MySQL (And Display Data)
How To Create A Table in MySQL (And Display Data)
Metal Cloud
DEPLOY TODAY
November 3, 2020
MYSQL
Introduction
Prerequisites
Create a Table in
MySQL Shell
A MySQL table stores and organizes data in
columns and rows as deOned during table
creation.
SHOW DATABASES;
USE movies;
Release
Title Genre Director
year
psychological
Todd
Joker 2019
thriller Phillips
The
epic
Empire Irvin
space 1980
Strikes Kershner
opera
Back
DESCRIBE movies;
Create a Table
Using a File Script
There is an option to create a MySQL table by
using a script.
SHOW DATABASES;
USE movies1;
SELECT * FROM movies1;
Create a View
Views are SQL queries that display data based
on deOned parameters.
Alter a View
The ALTER VIEW MySQL statement modiOes
the query parameters of the previously created
view. For example, we’ll modify the
minimum_release_year view to display the titles
of the movies whose release year is before
2018.
Conclusion
Milica Dancuk
Milica Dancuk is a technical writer at
phoenixNAP who is passionate about
programming. Her background in Electrical
Engineering and Computing combined with her
teaching experience give her the ability to
easily explain complex technical concepts
through her content.
MySQL
How to Create or Add an Index in
MySQL With Examples
August 31, 2020
MySQL, SysAdmin
How to Rename a Column in
MySQL
March 30, 2020
Databases, Networking
How to Allow Remote
Connections to MySQL
March 26, 2020
MySQL, SysAdmin
How to Import and Export MySQL
Databases in Linux
April 25, 2019