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

网站开发可以做什么/北京seo邢云涛

网站开发可以做什么,北京seo邢云涛,天津百度搜索排名优化,icp备案网站负责人索引MySQL的索引包括普通索引、唯一性索引(unique index)、全文索引(fulltext index)、单列索引、多列索引和空间索引等。1.索引的创建创建表的时候创建索引SQL语法:index|key [索引名] (属性名[(长度)] [asc|desc])create table newTable(id int not null primary …

索引

MySQL的索引包括普通索引、唯一性索引(unique index)、全文索引(fulltext index)、单列索引、多列索引和空间索引等。

1.索引的创建

·创建表的时候创建索引

SQL语法:index|key [索引名] (属性名[(长度)] [asc|desc])

create table newTable(

id int not null primary key,

name varchar(20),

age int,

index name_index(name(10))

);

·在已经存在的表上创建索引

SQL语法:create index 索引名 on 表名(属性名[(长度)] [asc|desc]);

create index age_index on newTable(age(10));

·使用alter table来创建索引

SQL语法:alter table table_name add index|key 索引名[(长度)] [asc|desc]);

alter table newTable add index name_index(name(5) desc);

2.查看索引

SQL语法:

show index from table_name[from db_name];

show index from mydb.mytable;

show index from newTable;#查看索引信息

3.删除索引

SQL语法:

drop index index_name on table_name;

alter table table_name drop index index_name;

alter table table_name drop primary key;

drop index name_index on newTable;

alter table newTable drop primary key;

视图

视图是一个虚拟表,其内容由查询定义。

1.视图的创建

SQL语法:create view 视图名[(视图列表)] as 查询语句;

create view student_view2(name,cname,grade)

as select sname,cname,grade

from student s,course c,sc

where s.sno=sc.sno and c.cno=sc.cno;

2.查看视图

describe语句:describe 视图名称;

show table status语句:show table status like '视图名';

show create view语句:show create view '视图名';

查询db1数据库下的student表:

select * from db1 a.view where student='student_view'\G

3.修改视图

create or replace view 视图名[{属性清单}] as select 语句;

create or replace view

student_view(姓名,选修课,成绩)

as select sname,cname,grade

from student s,course c,sc

where s.sno=sc.sno and c.cno=sc.cno;

4.删除视图

SQL语法:drop view [if exists] view_name[,view_name2];

drop view if exists student_view;

5.更新视图数据

update student_view set sno='001',sname='张三’,ssex='男';

http://www.lbrq.cn/news/1414801.html

相关文章:

  • 通过身份证号查房产/网站seo公司
  • 简单的公司网站系统/秦洁婷seo博客
  • 天翼云主机 网站服务器/百度手机怎么刷排名多少钱
  • 浙江省建设厅官方网站/seo排名软件免费
  • 做一个动态网站多少钱/网站如何才能被百度收录
  • 分销/郑州seo优化外包公司
  • 江阴网络公司做网站/百度站长工具使用方法
  • 青海网站建设公司/网页设计制作网站html代码大全
  • ppt模板怎么做 下载网站/新闻稿范文300字
  • 网站logo怎么改/网站推广要点
  • 做网站的代码难吗/软文推广文案范文
  • 怎么做旅游网站推广/windows优化大师如何卸载
  • 破解php网站后台密码/nba最新排名
  • 做网站需要哪些流程/充电宝关键词优化
  • 黄岛网站建设/天堂tv在线观看
  • 做网站是怎么赚钱的/辅导机构
  • 如果一个网站没有备案/今日预测足球比分预测
  • 建行网站会员是什么/广州网站推广服务
  • 大连公司名称大全/河北seo
  • 口碑好的网站建设哪家好/网络seo优化推广
  • 淮安做网站的公司/最近的国际新闻
  • 网站设计与制作/百度推广如何获取精准的客户
  • 政府门户网站 建设方案/南通百度seo代理
  • 一个主机可以建设多少个网站/站长工具seo推广 站长工具查询
  • 青岛网站改版/谷歌seo排名优化
  • 郑州网站设计收费低/网站百度收录
  • 多个网站一个域名/百度关键词搜索指数查询
  • 菠菜彩票网站怎么建设/二级域名查询网站
  • 美食网站开发的目标/个人对网络营销的看法
  • 网站开发的硬件环境/爱站
  • chapter07_初始化和销毁方法
  • Logstash——安全与权限管理
  • ODDR实现多bit单边沿采样数据转为多bit双沿采样数据
  • 使用安卓平板,通过USB数据线(而不是Wi-Fi)来控制电脑(版本1)
  • 19.web api 10
  • 23种设计模式——适配器模式(Adapter)​详解