1. create table about(
  2. content text
  3. )engine=myisam default charset=utf8;
项目的各个建表语句
  1. create database day456 default charset utf8;
  2. create table user(
  3. )engine=myisam default charset=utf8;
  4. select * from stu;
  5. use day456;
  6. drop table user;
  7. use day456;
  8. select * from user;
  9. truncate user;
  10. use hnscdb;
  11. select * from hnsc_guestbook;
  12. drop table hnsc_guestbook;
  13. create table hnsc_guestbook(
  14. id int unsigned auto_increment,
  15. gname varchar(50),
  16. content text,
  17. gsex varchar(5),
  18. gtell varchar(20),
  19. gphpne varchar(20),
  20. gadress varchar(50),
  21. gmail varchar(50),
  22. gtime int,
  23. gip varchar(15),
  24. gflag enum('y','n') default 'n',
  25. primary key(id)
  26. )engine=myisam default charset=utf8;
  27. create table hnsc_zz(
  28. id int unsigned auto_increment,
  29. ztitle varchar(200),
  30. url varchar(200),
  31. cname varchar(50),
  32. flag enum('y','n') default 'y',
  33. primary key(id),
  34. constraint fk foreign key (cname) references hnsc_zzclass(cname) on delete set null on update cascade
  35. )engine=innodb default charset=utf8;
  36. use hnscdb;
  37. select * from hnsc_zz;
  38. drop table hnsc_zz;
  39. truncate hnsc_zz;
  40. create table hnsc_zzclass(
  41. cname varchar(50),
  42. primary key(cname)
  43. )engine=innodb default charset=utf8;
  44. create table hnsc_zz(
  45. id smallint unsigned auto_increment,
  46. title varchar(50),
  47. url varchar(200),
  48. cname varchar(50),
  49. flag enum('y','n') default 'y',
  50. primary key(id),
  51. constraint fk foreign key (cname) references hnsc_zzclass(cname) on delete set null on update cascade
  52. )engine=innodb default charset=utf8;
  53. select * from hnsc_zzclass;
  54. select * from hnsc_zz;
  55. truncate hnsc_zz;
  56. create table hnsc_newsclass(
  57. cname varchar(50),
  58. primary key(cname)
  59. )engine=innodb default charset=utf8;
  60. create table hnsc_news(
  61. id smallint unsigned auto_increment,
  62. title varchar(50),
  63. content text,
  64. author varchar(200),
  65. num int unsigned default 0,
  66. ntime int unsigned,
  67. cname varchar(50),
  68. flag enum('y','n') default 'y',
  69. primary key(id),
  70. constraint nfk foreign key (cname) references hnsc_newsclass(cname) on delete set null on update cascade
  71. )engine=innodb default charset=utf8;
  72. drop table hnsc_news;
  73. select * from hnsc_newsclass;
  74. truncate hnsc_news;
  75. use hnscdb;
  76. select * from hnsc_link;
  77. drop table hnsc_pro;
  78. create table hnsc_pro(
  79. id smallint unsigned auto_increment,
  80. title varchar(50),
  81. img varchar(200),
  82. content text,
  83. num int unsigned default 0,
  84. ntime int unsigned,
  85. flag enum('y','n')default 'n',
  86. jflag enum('y','n')default 'y',
  87. primary key(id)
  88. )engine=myisam default charset=utf8;
  89. select * from hnsc_pro;
  90. truncate hnsc_pro;
  91. insert into hnsc_pro(content) values('你好');
  92. insert into hnsc_pro(title,ntime,flag,jflag,content) values('aa',545,'y','n','第三方');
  93. insert into hnsc_pro(title,ntime,flag,jflag,content,img) values('aa','10','y','n','你好','ds.jpg');
  94. use hnscdb;
  95. create table hnsc_user(
  96. account varchar(50) primary key,
  97. pwd varchar(50), -- 密码
  98. truename varchar(50),-- 真是姓名
  99. face varchar(200), -- 注册时上传的头像
  100. why varchar(100), -- 注册时设置的问题
  101. ok varchar(100), -- 设置的问题的答案
  102. rip varchar(15),
  103. regtime int unsigned-- 注册的时间
  104. )engine=myisam default charset=utf8;
  105. use hnscdb;
  106. select * from hnsc_user;
  107. drop table hnsc_user;
  108. -- 日志管理表
  109. create table hnsc_userlog(
  110. id smallint unsigned auto_increment,
  111. account varchar(50), -- 账户
  112. alog varchar(30), -- 用户的日志操作的内容
  113. aip varchar(15), -- 登录的ip
  114. atime int unsigned, -- 登录的时间
  115. primary key(id)
  116. )engine=myisam default charset=utf8;
  117. -- 上一篇
  118. select id from hnsc_news where cname in(
  119. select cname from hnsc_news where id=3)and id>3 limit 1;
  120. -- 下一篇
  121. select id from hnsc_news where cname in(
  122. select cname from hnsc_news where id=5)and id<5 order by id desc limit 1;
  123. select * from hnsc_news;
  124. create table about(
  125. content text
  126. )engine=myisam default charset=utf8;
  127. select * from about;
  128. drop table about;
  129. truncate table about;
  130. <h1 class="newschptit" style="margin: 0px; padding: 0px; border: 0px; width: 700px; text-align: cent

关于新闻,在线编辑器建表时此字段一定要为text的更多相关文章

  1. SAP:建表时如果有QUAN、CURR类型的字段不能激活的问题

    建表时如有一个QUAN类型的字段,那么就要给字段设置Reference field,参考的字段的Data Type要是UNIT, 并设置对应的Reference table,也就是参考字段所在的tab ...

  2. mysql workbench 建表时 PK,NN,UQ,BIN,UN,ZF,AI解释

    mysql workbench 建表时 - PK: primary key (column is part of a pk) 主键 - NN: not null (column is nullable ...

  3. MVC EF 移除建表时自动加上s的复数形式

    移除建表时自动加上s的复数形式 public class DBContext : DbContext { public DBContext() : base("name=DBContext& ...

  4. oracle 建表时显示ORA-00984: 列在此处不允许

      oracle 建表时显示ORA-00984: 列在此处不允许 CreationTime--2018年7月19日16点10分 Author:Marydon 1.情景展示 使用plsql建表时,报错 ...

  5. oracle 建表时显示ORA-00904无效的标识符

      oracle 建表时显示ORA-00904无效的标识符 CreationTime--2018年7月19日16点03分 Author:Marydon 1.情景展示 使用plsql建表时,报错 字段展 ...

  6. MySQL建表时列名同保留字重复问题解决办法

    建表时遇到遇到属性名同MySQL的保留字相同导致不能建表的问题,如下SQL语句: CREATE TABLE TBL_ACCOUNT_FROZEN_RECORD ( ID BIGINT NOT NULL ...

  7. 初触hibernate01--MYSQL建表时type=InnoDB和Engine=InnoDB注意点

    第一次运行程序时,将Hibernte中的hibernate.hbm2ddl.auto设置成create(或者是update),让Hibernate帮助自动建表,但不成功,报了如下信息: You hav ...

  8. 【原创】Hibernate通过实体类自动建表时type=MyISAM的问题

    ι 版权声明:本文为博主原创文章,未经博主允许不得转载. 当使用的mysql数据库为5.5版本时,方言需要设置为 <property name="hibernate.dialect&q ...

  9. Hbase建表时遇到的问题This could be a sign that the server has too many connections

    Hbase创建表时遇到以下错误: ERROR: org.apache.hadoop.hbase.ZooKeeperConnectionException: HBase is able to conne ...

随机推荐

  1. 【Python】实现5!+4!+3!+2!+1!

    #!/usr/bin/env python #-*- coding:utf-8 -*- def factorial_add(n): empty_list=[] #定义一个空列表 for i in ma ...

  2. Eos持久化实体

    持久化实体 2009-11-30 20:53:38|  分类: 记事本_学习笔记 |  标签: |举报 |字号大中小 订阅     在EOS的实体定义中,如果使用了关联实体方式,主实体的外键属性是不存 ...

  3. Sublime Text 3安装插件指南

    Sublime Text已经很用得很广泛,一般普通的功能已经够用,加入一些插件能些许加快开发. 安装 Package Control 有了插件控制器Package Control安装起来就很轻松了. ...

  4. 552 you must authentication

    配置邮箱到outlook时 出现以下错误: 发送测试电子邮件消息: 无法发送此邮件.请在帐户属性中验证电子邮件地址.  响应服务器: 552 you must authentication 需要在”其 ...

  5. UML学习笔记

    目前转岗到业务开发,业务逻辑用到了大量的类库.UML则是理解.指导其代码实现的利器. 有6种重要的关系,按照关系的强弱排序如下: 实现 = 泛化 > 组合(关联) >聚合 > 依赖 ...

  6. Linux设计准则

     计算机体系结构: 运算器 控制器 存储器,内存,编址 输出设备 输入设备 Linux内核功能: 进程管理内存管理文件系统网络功能硬件驱动安全机制 Linux的基本原则: 1.由目的单一的小程序组成: ...

  7. PlayerLog.lua --玩家登录通告

    print(">>Script: Player Log Message.") --CLASS 职业 --战士 --圣骑士 --猎人 --盗贼 --牧师 --死亡骑士 - ...

  8. px和em区别-在font-size的 css 的使用

    px像素(Pixel).相对长度单位.像素px是相对于显示器屏幕分辨率而言的. em是相对长度单位.相对于当前对象内文本的字体尺寸,多理解父级设定font-size的尺寸.如当前对行内文本的字体尺寸未 ...

  9. 装个centos虚拟机之设置桥接网络

    问题1:设置静态ip 虚拟机网路选择桥接后,设置静态ip: (1):先看下当前用的哪个网络 (2):打开配置文件,修改内容 内容参照mac配置,(注意:mac网络配置里的路由器就是默认网关GATEWA ...

  10. 合并excel-MergeExcel

    MergeExcel 将需要合并的excel放入该目录下,包含xls和xlsx 点击运行按钮: 输入包含多少列: 等待运行,完毕! 基于python编写,源码和exe于 TTyb