MySQL review and learning (two) database and the table structure to create delet

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

mysql -h localhost -uroot -p123456 //Connect to the database

show databases; //View the database

create database if not exists db_goods; //Create database

use db_goods; //Using the database

show tables; //View the database table

create table goods(id int, name varchar(10)); //Create table

desc goods; //Check mark

insert into goods(id, name) values('1', 'zhangsan'); //The data into the table

update goods set name = 'lisi', id = '3' where id = '1'; // Update data

delete from goods where id = '1';//Delete data

drop table if exists goods; //Delete table

drop database if exists db_goods; //Delete database

? contents; //View help

? create table;//Check the create table help

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Ziv at December 04, 2013 - 7:27 AM