1/17
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
mysql -h localhost -u root -p
To activate mysql
Show Databases;
To show databases
Create Database DatabaseName;
To Create a Database
Use DatabaseName;
To use a specific Database
Create Table TableName;
To create a Table
Desc TableName;
To describe the structure (schema) of a database table
Select* from TableName;
To show the Table
Insert into TableName Values();
To fill in/insert values into the table
Select Sum(ColumnName) from TableName;
To compute the sum of a specific column
Select Avg(ColumnName) from TableName;
To compute the average of a specific column
Select Count(ColumnName) from Bill;
To count how many data entries in the table
Select Max(ColumnName) from TableName;
To get the maximum value of a specific column;
Select Min(ColumnName) from TableName;
To get the minimum value of a specific column
Select* from TableName Order by ColumnName;
To arrange the data entries into ascending order
Select* from TableName Order by ColumnName desc;
To arrange the data entries into descending order
Select* from TableName Where Name like ‘Letter%’;
To search for a specific data entry using its first letter
Drop Table TableName;
To delete the table
Drop Database DatabaseName;
To delete a database