将多条记录的某个字段合并成一条记录 group_concat : 将某字段多条记录合并,默认逗号分隔 select group_concat(c.invoice_no) from ibc_comm_invoice c where c.settle_nos like concat('%',m.sett ...
分类:
数据库 时间:
2021-03-31 12:35:16
阅读次数:
0
// 下面value没有冒号,说明是字符串,只要给前面加上冒号就行了 <Select v-model="roleName"> <Option value=1>哈哈</Option> <Option value=0>呵呵</Option> </Select> // 这里通过 :value 绑定了为数字 ...
分类:
其他好文 时间:
2021-03-31 12:34:02
阅读次数:
0
自定义学生类 public class Student { public int Id { get; set; } public string Name { get; set; } public int ClassId { get; set; } public int Age { get; set; ...
分类:
其他好文 时间:
2021-03-31 12:08:29
阅读次数:
0
vi readreply.sh #!/bin/bash#第一部分 echo -n "What is your name?"readecho "Your name is $REPLY" #已将变量的值从标准输入读到REPLY #第二部分echo -n "What is the name of your ...
分类:
系统相关 时间:
2021-03-30 13:53:42
阅读次数:
0
SQL 构建器 原生 SQL 原生查询 SQL 和 Scan type Result struct { ID int Name string Age int } var result Result db.Raw("SELECT id, name, age FROM users WHERE id = ...
分类:
数据库 时间:
2021-03-30 13:50:41
阅读次数:
0
为了讲多路复用,当然还是要跟风,采用鞭尸的思路,先讲讲传统的网络 IO 的弊端,用拉踩的方式捧起多路复用 IO 的优势。 为了方便理解,以下所有代码都是伪代码,知道其表达的意思即可。 Let's go 阻塞 IO 服务端为了处理客户端的连接和请求的数据,写了如下代码。 listenfd = sock ...
分类:
其他好文 时间:
2021-03-30 13:34:02
阅读次数:
0
t=# create table d(i bigserial, j jsonb); CREATE TABLE t=# insert into d(j) select ('{"foreign_data":{ "some_key": '||g||', "src_data": { "VEHICLE": { ...
分类:
Web程序 时间:
2021-03-30 13:09:19
阅读次数:
0
select id,name where name='shenjian' select id,name,sex* where name='shenjian'* 多查询了一个属性,为何检索过程完全不同? 什么是回表查询? 什么是索引覆盖? 如何实现索引覆盖? 哪些场景,可以利用索引覆盖来优化SQL? ...
分类:
数据库 时间:
2021-03-30 12:55:59
阅读次数:
0
Find 关于 find find 是 MongoDB 中查询数据的基本指令,相当于 SQL 中的 SELECT。 find 返回的是游标(迭代器)。 find 示例: db.movies.find({"year": 1975}) // 单条件查询 db.movies.find({"year": 1 ...
分类:
其他好文 时间:
2021-03-26 15:23:59
阅读次数:
0
使用回归法选股, 和之前选取的因子是一样的 def regression_select(context,bar_dict): # 查询因子数据 q=query(fundamentals.eod_derivative_indicator.pe_ratio, fundamentals.eod_deriv ...
分类:
其他好文 时间:
2021-03-26 15:19:28
阅读次数:
0