创建数据表; create table 表名 ( 列明1 数据类型1 [约束性条件], 列明1 数据类型1 [约束性条件], …… ) tablespace 表空间 create table student05 ( student_id number not null, student_name v ...
分类:
数据库 时间:
2020-02-03 22:32:00
阅读次数:
85
创建数据表; create table 表名 ( 列明1 数据类型1 [约束性条件], 列明1 数据类型1 [约束性条件], …… ) tablespace 表空间 create table student05 ( student_id number not null, student_name v ...
分类:
数据库 时间:
2020-02-03 22:15:28
阅读次数:
88
1,设置表字段不能为空,前提是现有数据不能为空 alter table 表名 alter column 字段名 字段类型 not null 例如: alter table Temp_user alter column Gid uniqueidentifier not null 2,给表字段设置默认字 ...
分类:
数据库 时间:
2020-02-03 11:47:08
阅读次数:
70
在实际开发中会有这样的需求,想要自己设置表中自增字段的初始值。 比如:有一个your_table表中有一个自增字段id,我们知道,插入数据后,默认是从1开始自增的。 但是假如现在有一个需求,是要求id从100开始插入,那么该怎么实现呢?其实就是一句sql命令的事儿: select setval('y ...
分类:
数据库 时间:
2020-01-28 23:24:03
阅读次数:
117
1. 创建二维表 -- create table 表名 ( -- 字段名1 字段类型 [not null] [primary key] , -- 字段名2 字段类型 check(条件判断), -- 字段名3 字段类型 , -- ... -- constraint 约束名 primary key(字段 ...
分类:
数据库 时间:
2020-01-22 16:13:50
阅读次数:
164
查看创建数据库的语句 SHOW CREATE DATABASE 表名 查看数据表的定义语句 SHOW CREATE TABLE 表名 显示表的结构 DESC 表名 ...
分类:
数据库 时间:
2020-01-20 13:07:20
阅读次数:
108
mysql教程:http://c.biancheng.net/mysql/ https://www.runoob.com/mysql/mysql-tutorial.html 1、设置自增id从n开始 ALTER TABLE 表名 AUTO_INCREMENT=n; 2、sql命令: 用于清空某表的数 ...
分类:
数据库 时间:
2020-01-14 21:00:35
阅读次数:
119
1.分组查询 group by 分组条件 having 查询条件 注意:select 后的字段要么是分组标准,要么是经过合适的组函数处理过的 2.子查询 from 之后 having之后 from 之后 3.创建表 ctreat table 表名( 字段名 类型, 字段名 类型, ... ... ) ...
分类:
数据库 时间:
2020-01-13 16:37:29
阅读次数:
95
添加字段的SQL语句的写法: 通用式: alter table [表名] add [字段名] 字段属性 default 缺省值 default 是可选参数 增加字段: alter table [表名] add 字段名 smallint default 0 增加数字字段,整型,缺省值为0 alter ...
分类:
数据库 时间:
2020-01-13 11:08:18
阅读次数:
137
在ElmentUI的Table表格组件中,也许你会使用type为selection值的多选框功能,但是此时设置的label属性不生效,不能设置标题名称;有时候我们的需求就是要添加标题名称,那该如何处理呢?当然你可以对其样式做特殊处理,也可以自定义标题,本文将描述如何利用自定义标题来添加多选框和标题名 ...
分类:
其他好文 时间:
2020-01-12 15:06:00
阅读次数:
1074