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

建设网站如何赢利wordpress如何上传

建设网站如何赢利,wordpress如何上传,专业网站开发技术,阿里巴巴网站建设与维护训练技能点#xff1a; 学会使用sql语句创建数据库、表、约束、建立数据库关系图 使用到的软件#xff1a;SQL Server2008 代码如下#xff1a; use master go if exists(select * from sysdatabases where nameBBS) --判断BBS库是否存在#xff0c;若存在则先删除drop…训练技能点 学会使用sql语句创建数据库、表、约束、建立数据库关系图 使用到的软件SQL Server2008 代码如下 use master go if exists(select * from sysdatabases where nameBBS) --判断BBS库是否存在若存在则先删除drop database BBScreate database BBS on primary ( nameBBS_data, filenamec:\data\BBS_data.mdf, size10, maxsize20, filegrowth20% ) log on ( nameBBS_log, filenamec:\data\BBS_log.ldf, size1, maxsize10, filegrowth10% ) gouse BBS go if exists(select * from sysobjects where nameBBSUser) --判断BBSUser表是否存在若存在则先删除drop table BBSUsercreate table BBSUser --创建论坛用户表 ( UID int primary key identity not null, --用户编号设为主键 UName varchar(20) not null, --用户昵称 UPassword varchar(10) null, --密码 UEmail varchar(40) null, --电子邮件 UBirthday varchar(30) not null, --生日 USex bit not null, --性别 UClass int not null, --用户等级 UStatement varchar(50) null, --用户备注 URegDate datetime not null, --注册日期 UState int null, --用户状态 UPoint int null --用户积分 ) gouse BBS go if exists(select * from sysobjects where nameBBSTopic)drop table BBSTopiccreate table BBSTopic ( TID int primary key identity not null, --标识主键列 TNumber int not null, --帖子编号 TSID int not null, --所在版块 TUID int not null, --发帖人 TReplyCount int not null, --回复数 TEmotion int null, --回复表情 TTopic varchar(40) not null, --主题 TContents varchar(40) not null, --正文 TTime datetime not null, --回复时间 TClickCount int null, --点击数 TFlag int null, --状态 TLastClickT datetime --最后回复时间 ) gouse BBS go if exists(select * from sysobjects where nameBBSReply)drop table BBSReplycreate table BBSReply ( RID int primary key identity not null, --标识主键列 RNumber int not null, --帖子编号 RTID int not null, --回复的主贴 RSID int not null, --所在板块编号 RUID int not null, --发帖人编号 REmoticon int null, --发贴表情 RTopic varchar(40) not null, --主题 RContents varchar(40) not null, --正文 RTime datetime --发帖时间 ) gouse BBS go if exists(select * from sysobjects where nameBBSSection)drop table BBSSectioncreate table BBSSection ( SID int primary key identity not null, --版块编号主键 SName varchar(30) not null, --版块名称 SMasterID int not null, --版主编号 SStatement varchar(30) not null, --本版格言 SClickCount int null, --点击率 STopicCount int null --帖子数量 ) go--添加约束 --1、为BBSUser表添加约束 alter table BBSUser add constraint df_UPassword default 888888 for Upassword alter table BBSUser add constraint df_USex default 1 for Usex alter table BBSUser add constraint df_URegDate default getdate() for URegDate alter table BBSUser add constraint df_UState default 0 for UState alter table BBSUser add constraint df_UClass default 1 for UClass alter table BBSUser add constraint df_UPoint default 10 for UPoint alter table BBSUser add constraint ck_UPassword check(len(UPassword)6)--2、为BBSTopic表添加约束 alter table BBSTopic add constraint df_TReplycount default 0 for TReplycount alter table BBSTopic add constraint df_TTime default getdate() for TTime alter table BBSTopic add constraint df_TClickcount default 0 for TClickcount alter table BBSTopic add constraint df_TLastClickT default getdate() for TLastClickT alter table BBSTopic add constraint fk_TSID foreign key(TSID) references BBSSection(SID) alter table BBSTopic add constraint fk_TUID foreign key(TUID) references BBSUser(UID)--3、为BBSReply表添加约束 alter table BBSReply add constraint df_RTime default getdate() for RTime alter table BBSReply add constraint fk_RTID foreign key(RTID) references BBSTopic(TID) alter table BBSReply add constraint fk_RSID foreign key(RSID) references BBSSection(SID) alter table BBSReply add constraint fk_RUID foreign key(RUID) references BBSUser(UID)--4、为BBSSection表添加约束 alter table BBSSection add constraint df_SClickCount default 0 for SClickCount alter table BBSSection add constraint df_STopicCount default 0 for STopicCount alter table BBSSection add constraint fk_SMasterID foreign key (SMasterID) references BBSUser(UId)运行上述代码并刷新后便可见创建的数据库、表以及约束 如下 其数据库关系图如下图 在建立数据库关系图时开始就遇见了一些问题不知道咋建立关系图然后查了查资料就解决了如果有类似情况的小伙伴请进入传送门一起来解决这个问题吧 点击此处打开传送门SQL Server如何建立数据库关系图别急一串代码让你轻松永久解决此类问题
http://www.zqtcl.cn/news/37385/

相关文章:

  • 自动生成海报的网站网站在线生成app
  • 商业网站制作价格网站建设 思路
  • 上海 网站开发 兼职拼多多推广关键词首选帝搜软件
  • 像优酷这样的网站需要怎么做自己网站做搜索引擎优化
  • 厦门建站公司哪家好classplus wordpress
  • 政和网站建设wzjseo长沙百度网站推广公司
  • 济南做网站最好的公司教育直播平台搭建
  • 设计坞网站官方下载推广关键词外包
  • 呼伦贝尔做网站的公司wordpress七牛云加速
  • 搜索引擎营销总结seo难不难学
  • 网站如何减少404跳转wordpress后台分类目录添加自定义
  • 做中英双语切换的网站wordpress底下固定
  • 个人主页网站模板html创意作品
  • 网站应该如何进行优化免费做网站怎么做网站链接
  • 企业网站开发价设计软件图标
  • 淘宝客怎么样做网站网站备案需要多长时间
  • 网站建设需求分析酒类找代理商的渠道有哪些
  • 深紫色网站如何做可以赚钱的网站
  • 纯静态网站做优化有什么影响wordpress大数据
  • 深圳公司网站设计公司linux建站和wordpress建站
  • wordpress建站菜单栏 二级标题新浪 sae wordpress
  • 网站开发合同官司最近中国新闻事件
  • 做网站什么时候注册商标网站建设总结和体会
  • 网站消耗流量做网站海口
  • 班级展示网站网站维护的基本概念
  • 自己的网站怎么制作网站开发入门书籍
  • 徐州企业网站模板建站查询个人公司注册公司
  • pageadmin做的网站的域名必须要备案吗wordpress wp_enqueue_script
  • 网站建设的目的及意义佛山高明
  • 计算机专业论文 网站建设注册公司注册资金最低多少钱