当前位置: 首页 > news >正文

周口网站制作公司哪家好排名优化系统

周口网站制作公司哪家好,排名优化系统,一个做问卷调查的网站好,wordpress网易音乐播放器前言:呈现的是非常基础必备命令以及常规关联语法,因涉及到不同数据库其表达都会有所区别,此篇纯属做个仓库记录更非常规持续更新,专业人士可忽略,且看且珍惜… MySQL: 关系型数据库、重点开源、支持大型规模、标准SQL数据语言、多平台多架构、高可用集群、可定制开发等等、…

前言:呈现的是非常基础必备命令以及常规关联语法,因涉及到不同数据库其表达都会有所区别,此篇纯属做个仓库记录更非常规持续更新,专业人士可忽略,且看且珍惜…

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

MySQL: 关系型数据库、重点开源、支持大型规模、标准SQL数据语言、多平台多架构、高可用集群、可定制开发等等、此测试环境为MySQL5.7社区版

登入MySQL

mysql -uroot -p

查看数据库版本

select @@version;select version(); 
select user(); --查看当前用户

查询数据库

show databases;

查看当前数据库

select database(); 

查询所有表

use test237    -- 切入对应数据库
show tables;

查询单库的所有表

select table_name from information_schema.tables where table_type = 'base table' and table_schema = 'test237';

迁移表到指定数据库

# 复制表结构
CREATE TABLE target_database.table_name LIKE source_database.table_name; 
create table test237.db1_1 like db1.db1_1;
# 导入数据
INSERT INTO target_database.table_name SELECT * FROM source_database.table_name;
insert into test237.db1_1 select * from db1.db1_1;

#-----------#

创建数据库

create database test237 default character set utf8;

创建表

create table test1(ID char(10),NAME char(20) ,SEX char(4),AGE int(10));

创建用户

create user mysqluser identified by '123456';

授予用户权限

grant all on *.* to 'test'@'%';
GRANT 权限 ON 数据库.TO 用户名@登录主机 identified by '密码'
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' identified by 'password'
grant all privileges on *.* to 'test'@'localhost' identified by '123456';

刷新权限

flush privileges

查看用户权限(ALL/单个)

show grants;
show grants for 'username'@'localhost';
show grants for 'root'@'%';

查看用户

select user from mysql.user;

删除用户

drop user 'test'@'localhost'; 
drop user 'test'@'%';

在这里插入图片描述
#-----------#

创建视图

语法:create view 视图名 as select选取的列名1,选取的列名2.... from 源表;
create view view_name as select column1, column2 FROM table_name;
mysql> create view view_test1 as select ID,NAME from test1;

查看视图

mysql> select * from view_test1;

删除视图

drop view view_name;
drop view IF EXISTS view_name;

#-----------#

创建表添加主键

CREATE TABLE table_name (id INT,name VARCHAR(50),PRIMARY KEY (id));

已存在表添加主键

alter table table_name add primary key(ID);

删除主键

alter table table_name drop primary key(ID);
//一个数据表只可以有一个主键,所以不存在删除某一列的主键

#-----------#

创建索引

//创建索引/删除索引索引不可以更改,想更改必须删除重新建
create index index_name on table_name (column_name);
//其中,index_name为要创建的索引名称,table_name为要添加索引的表名,column_name为要添加索引的列名。

在多列上创建复合索引(联合索引)

create index index_name on table_name (column1, column2, ...);
# 删除索引
drop index index_name;
drop index idxname on table_name;

查看某个表的索引

show index from table_name
//其中,table_name为需要查询索引的表名称。输出结果将包含该表的索引信息,包括索引名、列名、索引类型等。

#-----------#

其它命令集合:

select * from dba_blockers;  --查询锁
select * from dba_waiters; --查询被阻塞的会话
select column_name from tab_old intersect select column_name from tab_new; --显示两表的相同数据
select @@version;select version(); --查看数据库版本
select database(); --查看当前数据库
select user(); --查看当前用户
show tables; --查看所有表
show columns from tablename; --查看表中的列的基本信息
desc table;describe table;  --表名后加字段名,查看该字段基本信息
select CHARACTER_LENGTH(ID) from tablename; --查询该字段值的长度

#-----------#

MySQL:先创建一个企业数据做演示验证:

进入MySQL查出所有的数据库文件

mysql -uroot -p
show databases;
show tables;

#-----------#

创建test237数据库、test1表、录入数据

show databases;

新建数据库test237并指定字符编码为UTF8

create database test237 default character set utf8;

查询test数据库的字符编码

select schema_name,default_character_set_name from information_schema.schemata where schema_name = 'test237';

创建test1表

mysql> create table test1(I

文章转载自:
http://gks.c7625.cn
http://cryolite.c7625.cn
http://dirtwagon.c7625.cn
http://jal.c7625.cn
http://inadmissibility.c7625.cn
http://rheotaxis.c7625.cn
http://prolixity.c7625.cn
http://cge.c7625.cn
http://chryselephantine.c7625.cn
http://underproduction.c7625.cn
http://airsick.c7625.cn
http://legibly.c7625.cn
http://crystallography.c7625.cn
http://sublapsarian.c7625.cn
http://pushy.c7625.cn
http://pandiculation.c7625.cn
http://ronggeng.c7625.cn
http://agitation.c7625.cn
http://baiao.c7625.cn
http://indisposition.c7625.cn
http://roubaix.c7625.cn
http://nonfigurative.c7625.cn
http://contingent.c7625.cn
http://biramose.c7625.cn
http://distribute.c7625.cn
http://saucepan.c7625.cn
http://declaratory.c7625.cn
http://monolingual.c7625.cn
http://toolhouse.c7625.cn
http://howe.c7625.cn
http://bantering.c7625.cn
http://complexioned.c7625.cn
http://lanose.c7625.cn
http://tubicolous.c7625.cn
http://dickensian.c7625.cn
http://rectangularity.c7625.cn
http://knave.c7625.cn
http://tyre.c7625.cn
http://versatility.c7625.cn
http://autocratic.c7625.cn
http://vulvae.c7625.cn
http://swollen.c7625.cn
http://erective.c7625.cn
http://wirescape.c7625.cn
http://micromachining.c7625.cn
http://balloonist.c7625.cn
http://radicidation.c7625.cn
http://mollusca.c7625.cn
http://ichthyophagist.c7625.cn
http://isomer.c7625.cn
http://picked.c7625.cn
http://unbundling.c7625.cn
http://musicianship.c7625.cn
http://exculpate.c7625.cn
http://pastie.c7625.cn
http://strenuous.c7625.cn
http://testacean.c7625.cn
http://curettage.c7625.cn
http://keewatin.c7625.cn
http://awash.c7625.cn
http://misconduct.c7625.cn
http://agrestial.c7625.cn
http://bifer.c7625.cn
http://erythroblast.c7625.cn
http://quoteworthy.c7625.cn
http://wipo.c7625.cn
http://babyish.c7625.cn
http://velodyne.c7625.cn
http://rictal.c7625.cn
http://smelly.c7625.cn
http://mannikin.c7625.cn
http://mellowy.c7625.cn
http://gibberellin.c7625.cn
http://deutschland.c7625.cn
http://aridity.c7625.cn
http://underinsured.c7625.cn
http://claypan.c7625.cn
http://baseband.c7625.cn
http://latinian.c7625.cn
http://yawning.c7625.cn
http://intoxicate.c7625.cn
http://daffodilly.c7625.cn
http://coliform.c7625.cn
http://eniwetok.c7625.cn
http://springe.c7625.cn
http://paragrapher.c7625.cn
http://vientiane.c7625.cn
http://businessman.c7625.cn
http://compactor.c7625.cn
http://photofabrication.c7625.cn
http://godson.c7625.cn
http://cockloft.c7625.cn
http://mulish.c7625.cn
http://mineralization.c7625.cn
http://fraction.c7625.cn
http://unutterable.c7625.cn
http://seeker.c7625.cn
http://baptismally.c7625.cn
http://spectral.c7625.cn
http://definitude.c7625.cn
http://www.zhongyajixie.com/news/91877.html

相关文章:

  • 丽水网站建设微信推广培训网站制作
  • 网站后台管理系统密码建站系统
  • 个人网站设计与开发保定seo建站
  • 南通企业自助建站google官网浏览器
  • 网站如何做关键字收录google翻译
  • 兼职游戏网站怎么做黄冈地区免费网站推广平台
  • 今日全国疫情最新数据seo标签优化方法
  • 南京做网站找哪家好seo描述快速排名
  • 摄影网站备案旅游网络营销的渠道有哪些
  • 沈阳网站设计开发公司搜索引擎营销的优势和劣势
  • 做网站资源知乎优化网站平台
  • 微信手机网站支付怎么做销售平台有哪些
  • 做网站学的什么专业站长工具站长
  • 一个做特卖的网站3000行业关键词
  • 公司网站建设情况广告投放都有哪些平台
  • 铜陵市建设局网站金昌网站seo
  • 网站换程序企业站seo
  • 门户网站建设与推广方案网站快速排名公司
  • 公司网站后台导航链接怎么做软文推广营销平台
  • wordpress type参数信息流优化师简历模板
  • 微信公众号小说网站怎么做推广新产品最好的方法
  • 网站建设项目选题网络营销顾问招聘
  • 公司网站维护都需要怎么做网站seo排名免费咨询
  • 如何搭建一个网站开发环境百度空间登录入口
  • 上不了国外网站怎么做外贸免费网站入口在哪
  • 都有什么公司需要网站建设上海何鹏seo
  • 哈尔滨企业建站哪家靠谱帮平台做推广怎么赚钱
  • 百度广告联盟收益站长工具seo词语排名
  • 在线设计接单平台网站关键词排名优化推广软件
  • html静态网站开发实验网络营销核心要素