Create 语句 Create database语句 ? 语句是在MySQL实例上创建一个指定名的数据库, 语句的语义和 是一样的。先来看下create的语法: 当创建的数据库本身存在而且没有写明 子句时,则创建数据库的语句会报错,实例如下: create_specification子句指明创建的 ...
分类:
数据库 时间:
2020-02-19 23:46:23
阅读次数:
127
想插入数据库一条记录,如果这条记录的主键或者Unique键已存在,则更新这条记录,如果主键或Unique键不存在,则新增这条记录。用Mybatis实现。网上有些方法说用replace into,但是mybatis是不支持的。所以,必须使用ON DUPLICATE KEY UPDATE。 <inser ...
分类:
其他好文 时间:
2020-02-19 13:25:19
阅读次数:
144
create [unique] index index_name on table_name(column_name[,columnname2...]) tablespace tab_space;--创建索引 select * from all_indexs;--获取所有索引信息 ...
分类:
数据库 时间:
2020-02-18 20:55:28
阅读次数:
93
如何选择合适的列建立索引1.在where从句,group by从句,order by从句,on从句中出现的列2.索引字段越小越好3.离散度大的列放到联合索引的前面1select * from payment where staff_id = 2 and customer_id = 584;由于cus... ...
分类:
数据库 时间:
2020-02-18 16:45:06
阅读次数:
74
一、题目说明 题目62. Unique Paths,在一个m n矩阵中,求从左上角Start到右下角Finish所有路径。其中每次只能向下、向右移动。难度是Medium! 二、我的解答 这个题目读读题目,理解后不难。定义一个 ,初始化最后一列为1,最后一行为1,然后循环计算到 就可以了。 代码如下: ...
分类:
其他好文 时间:
2020-02-18 09:36:51
阅读次数:
62
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any p ...
分类:
其他好文 时间:
2020-02-17 22:33:36
阅读次数:
99
manjaro linux 安装 Apache,MariaDB,PHP(LAMP) root 身份执行下面的命令 1. 升级系统 2. 安装 Apache 升级完后,安装Apache 编辑 /etc/httpd/conf/httpd.conf file 找到LoadModule unique_id_ ...
分类:
数据库 时间:
2020-02-17 14:12:35
阅读次数:
75
1.题目描述 英文版: Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which ...
分类:
其他好文 时间:
2020-02-17 00:47:28
阅读次数:
51
group = sample(seq(1,10),size = 20,replace = T) #这20个组分别属于1,...,10 v = rnorm(length(unique(group)),0,1) 对组1,...,10分别分别赋值 vj = v[group] 把值分配到每个组 ...
分类:
编程语言 时间:
2020-02-16 14:59:12
阅读次数:
131
Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the ...
分类:
其他好文 时间:
2020-02-16 01:35:33
阅读次数:
58