本文实例讲述了mysql语句实现简单的增、删、改、查操作。分享给大家供大家参考,具体如下:
1、创建db_shop数据库,如果该数据库不存在则创建
create database if not exists db_shop;
2、删除数据库,如果该数据存在就删除
drop database if exists db_shop;
3、给db_shop创建数据表
use db_shop;
drop table if exists tb_goods;
CREATE TABLE tb_goods(
`goodsId` int(11) NOT NULL AUTO_INCREMENT,
PR