MySQL Command Line Client Exercises
MySQL Command Line Client Exercises
0. After start XAMPP a. For WIN cmd: C:\xampp\mysql\bin\mysql.exe -u root b.For LIN term: /Applications/XAMPP/bin/mysql -u root
1. mysql>SHOW DATABASES;
2. mysql>CREATE DATABASE pets;
3. mysql>SHOW DATABASES;
4. mysql>USE pets;
5.
mysql>CREATE TABLE cats
(
id
INT unsigned NOT NULL AUTO_INCREMENT, #
Unique ID for the record
name
VARCHAR(150) NOT NULL,
# Name
of the cat
owner
VARCHAR(150) NOT NULL,
# Owner
of the cat
birth
DATE NOT NULL,
#
Birthday of the cat
PRIMARY KEY
(id)
# Make
the id the primary key
);
6. mysql>SHOW TABLES;
7. mysql>DESCRIBE cats;
8. mysql>INSERT INTO cats ( name, owner, birth) VALUES
( 'Sandy', 'Lennon', '2015-01-03' ), ( 'Cookie', 'Casey', '2013-11-13' ), ( 'Charlie', 'River', '2016-05-21' );
9.
mysql>SELECT * FROM cats;
10. mysql>SELECT name FROM cats WHERE owner = 'Casey';
11. mysql>DELETE FROM cats WHERE name='Cookie';
12. mysql>SELECT * FROM cats;
13. mysql>ALTER TABLE cats ADD gender CHAR(1) AFTER name;
14. mysql>DESCRIBE cats;
15. mysql>SHOW CREATE TABLE cats\G
16. mysql>ALTER TABLE cats DROP gender;
17. mysql>DESCRIBE cats;
18. mysql>DROP TABLE cats;
19. mysql>DROP DATABASE pets;
20. mysql>SHOW DATABASES;
21. mysql>SELECT VERSION(), CURRENT_DATE;
22. mysql>SELECT SIN(PI()/4), (4+1)*5;
23. mysql>SELECT VERSION(); SELECT NOW();
24. mysql>SELECT
->USER() ->,
->CURRENT_DATE ->;
25. mysql> QUIT
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- download mysql 56 command line client
- mysql administrator
- download mysql 5 6 command line client 2021
- download mysql 5 6 command line client verified
- mysql tutorial
- mysql and windows
- mysql command line client exercises
- getting started with mysql
- download mysql 5 6 command line client best
- mysql shell tutorial sjsu
Related searches
- command line to reset password
- powershell command line switches
- powershell run command line exe
- run command line from powershell
- command line pdf
- windows command line tutorial pdf
- windows 10 command line reference
- powershell command line switch parameter
- mysql command show databases
- list databases mysql command line
- mysql command line show database
- new line command line python