MySQL - Add Records and Search Tables (insert, select)

preview_player
Показать описание

nsert into table(column1, column2) values(‘value1’,’value2’); – Inserts records into Table. TEXT type values need single quotation marks ‘ ‘.
Select * from table; – Selects ALL records from table and displays ALL columns
Select * from table order by column; – Selects all records, shows all columns and then orders by column.
Select * from table order by column desc – Changes ordering to be depending.
Select * from table where column = ‘x’; – Shows records where the value in column equals what is requested. For number values you can use = conditions and more.
Select column1,column2 from table; – Only displays data from specified columns
Select column1, column2 from table where column = ‘x’ order by column; – Shows specific columns where ‘x’ is true and is ordered by a column.
Setup MySQL Lab:

show databases;

create database classDB;

use classDB;

Create table users(
user_id INT Auto_INCREMENT PRIMARY KEY,
name TEXT,
age INT,
gender TEXT
);

show tables;

desc users;
Рекомендации по теме
Комментарии
Автор

Eli, you are cranking these videos out quickly! I appreciate the effort and quality of instruction from a guy trying to be refreshed with concepts taught to me many moons ago!

MattRMcD
Автор

Thank you for all your work on these videos. Your teaching method works great for me.

gatechyellow
Автор

Awesome Class!!! Everything is very clear!

eagleeye
Автор

Using "int" primitive type for the "age" 😹 this DB is ready for future cryogenic life!

GooogleGoglee
Автор

I have questions : can we use varchar data type in place of text

dealsdagger
Автор

1 question though dude: Whats with all the semi columns?? Haha !

ueyustick
visit shbcf.ru