Starting today, I started a new field and started to learn SQL databases. Now, let's start with the basics ~~ Keep up with me. Today, let's talk about the basic database operations. In the DOS environment of MySQL, the following actions are completed: showdatabases; createdatabaseexample; showdatabases; showcharacterset; alterdatab
Starting today, I started a new field and started to learn SQL databases. Now, let's start with the basics ~~ Keep up with me. Today, let's talk about the basic database operations. In the DOS environment of MySQL, the following actions are completed: show databases; create database example; showdatabases; show character set; alter datab
Starting today, I started a new field and started to learn SQL databases. Now, let's start with the basics ~~ Catch up with the gods. Today, let's talk about basic database operations.
Database Operations
In the DOS environment of MySQL, perform the following actions:
show databases;create database example;showdatabases;show character set;alter databases example character set gbk;drop database example;show databases;
From the beginning of the first sentence to the explanation of the last sentence
1. Check the existing database
2. Create a database named example
3. display the existing database again
4. View All character sets
5. Change the character set of database example to gbk.
6. Delete the example Database
7. display the database
Data Table operations
Create database example; -- create example database use example; -- select create table student (id int, name varchar (20), score double ); -- create a data table named show tables; -- show that the existing data table alter table studentadd chinese double; -- add the chinese column alter table studentmodify name verchar (200) to the data table student ); -- alter table studentchange chinese math double; desc student; -- display the data table studentdrop table student; -- delete the data table studentshow tables;
All these are basic operations on databases and data tables. The experiment is clear ~~