创建mysql数据库 CREATE DATABASE IF NOT EXISTS `database_name` DEFAULT CHARSET utf8 COLLATE utf8_general_ci; 创建mysql数据表 drop table if exists `table_name`; create table if not exists `table_name` ( id int auto_increment primary key comment '主键编号', `name` )…
Demo: 创建数据库的语法 1.基本语法 create database tour character set gbk; use tour; 无主键自增长的 create table EMB_T_Employee ( emb_c_operatorID int not null, emb_c_empCode varchar(255) not null, emb_c_gender int not null, emb_c_email …
--如果存在数据库PRogrammerPay 就删除 if exists (select * from sysdatabases where name='programmerPay') drop database programmerPay go --创建数据库programmerPay create database programmerPay on primary ( name ='programmerPay_data', filename='D:\programmerPay\progra…
mysql> create database ceshi; Query OK, 1 row affected (0.01 sec) 给数据库授权,否则程序时无法连接ceshi数据库的,每次创建一个数据库都要记得给数据库授权. mysql> grant all privileges on ceshi.* TO 'root'@'%' identified by 'jenkins@123' with grant option; Query OK, 0 rows affected, 1 warning…