sqlalchemy 多态 polymorphic 实现单表继承 sqlaclchemy中的单表继续就是以一个模型类为基类,其他模型类继承基类,所有模型类的的数据都存一张表里面(也可以是多张,只不过基类模型类的字段是共享的) 下面建立三个模型类(表) class Human(db.Model): _ ...
分类:
数据库 时间:
2021-02-04 11:49:21
阅读次数:
0
1.表字段如下图,要求:分区计算总处数,总面积,已处理数,已处理面积,未处理数,未处理面积 2.计算结果如下: 3.sql如下:知识点:sum后的case可以根据A列状态,来计算B列的值。 sum(case when sfcl='否'then mjm else 0 end) wcltbmj 1 se ...
分类:
数据库 时间:
2021-02-04 11:42:00
阅读次数:
0
MySQL中若要在i ≤ R ≤ j 这个范围得到一个随机整数R ,需要用到表达式 FLOOR(i + RAND() * (j – i + 1))。例如, 若要在7 到 12 的范围(包括7和12)内得到一个随机整数, 可使用以下语句: SELECT FLOOR(7 + (RAND() * 6)); ...
分类:
数据库 时间:
2021-02-03 10:48:30
阅读次数:
0
sql层级结构 declare @HID HierarchyidSELECT @HID=HID FROM dbo.ProjectSub WHERE AID=274SELECT @HID as HID --0x4AD72AC0 5级节点 水冷壁SELECT @HID=@HID.GetAncestor( ...
分类:
数据库 时间:
2021-02-03 10:37:37
阅读次数:
0
Why personal data matters? Why protect personal data? What is GPDR? What do companies rish when they don't play by the rules? What is personal data? T ...
分类:
其他好文 时间:
2021-02-03 10:36:39
阅读次数:
0
for update 和 for update nowait的相同点 对操作的数据行进行加锁,在事务提交前防止其他操作对数据的修改 使用for update 测试工具 pgadmin,打开SQL窗口,关闭事务的自动提交,改成手动提交事务 select * from table1 where id = ...
分类:
其他好文 时间:
2021-02-02 10:48:35
阅读次数:
0
A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number ...
分类:
其他好文 时间:
2021-02-01 12:26:52
阅读次数:
0
字符串类型 声明变量 //声明字符串 String str1 = 'hello'; String str2 = 'dart'; //字符串拼接 print('$str1 $str2'); print(str1 + " " + str2); 属性 String str = 'hello world'; ...
分类:
其他好文 时间:
2021-02-01 12:21:53
阅读次数:
0
select request_session_id spid,OBJECT_NAME(resource_associated_entity_id) tableName from sys.dm_tran_locks where resource_type='OBJECT' spid 锁表进程 tabl ...
分类:
数据库 时间:
2021-02-01 11:38:30
阅读次数:
0
# 查找进程文件位置 [toc] ## wmic ```txt 1. 使用get查询 wmic process get name,executablepath 2 无条件查询 wmic process list brief wmic process list full 3 加where条件查询 wm ...
分类:
系统相关 时间:
2021-01-30 12:08:54
阅读次数:
0