码迷,mamicode.com
首页 > 数据库 > 详细

java 21-mysql

时间:2019-09-19 10:29:09      阅读:116      评论:0      收藏:0      [点我收藏+]

标签:sql   varchar   insert   stat   databases   from   删除   net   netstat   

>> show databases;

>>CREATE DATABASE bigdata; 创建

>> use bigdata;

>>drop database bigdata; 删除

>>create table bigdata.mytable(id int ,nane varchar(200)); 创建表

>>insert into bigdata.mytable(id,nane

)VALUES(1,‘tom‘); 插入数据

>>select  * from  bigdata.mytable where  id=1;查询

>>update mytable set id=3,nane=‘test‘ where id=1 ;更新

>>DELETE from bigdata.mytable where id=1; 删除数据

>> drop table bigdata.mytable;删除表

>>mysql 不区分大小写

>>select nane,id from  bigdata.mytable where nane like ‘j%‘; 模糊查询

>>select nane,id from  bigdata.mytable where nane like ‘%t_‘;   _模糊匹配 t后面的单个字符

>>desc tablea;

>>create table  t2 like t1;创建表结构 不含有数据

>>create table t2 as select * from t1;复制表结构含有数据

----cmd的下 netstat -ano 查看端口

 

java 21-mysql

标签:sql   varchar   insert   stat   databases   from   删除   net   netstat   

原文地址:https://www.cnblogs.com/simly/p/11547295.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!