亡羊补牢

导航

2020年1月20日 #

sql server 多字段约束不能完全一样

摘要: --已有主键 --需要增加约束,多个字段不能完全一直 alter table WmsStorageInOrder add constraint PK_Joint_WmsStorageInOrder unique(Deleted,ErpNumber,ClientCode,WarehouseCode) 阅读全文

posted @ 2020-01-20 18:50 亡羊补牢 阅读(455) 评论(0) 推荐(0) 编辑

2018年6月13日 #

mysql 主从库同步

摘要: #主库修改my.ini [mysqld] server-id=2 log-bin=mysql-bin binlog-do-db=demo #从库修改my.ini [mysqld] server-id=3 replicate-do-db=demo --配置完成后重启主从库 #主库为从库添加用户 grant replication slave,reload,super on *.* to s... 阅读全文

posted @ 2018-06-13 11:26 亡羊补牢 阅读(225) 评论(0) 推荐(0) 编辑

2017年12月26日 #

postgresql 日期生成流水号

摘要: 1 --表结构 2 DROP TABLE if exists public.sys_tabid; 3 CREATE TABLE public.sys_tabid 4 ( 5 id serial NOT NULL , 6 type character varying(50), 7 code character varying(50) NOT NULL, 8 seed... 阅读全文

posted @ 2017-12-26 12:25 亡羊补牢 阅读(695) 评论(0) 推荐(0) 编辑

2017年10月15日 #

PostgreSQL uuid

摘要: --执行一 create extension "uuid-ossp" --执行二 select uuid_generate_v4() 阅读全文

posted @ 2017-10-15 15:29 亡羊补牢 阅读(172) 评论(0) 推荐(0) 编辑

2017年9月30日 #

mysql 外网访问

摘要: 1 --修改用户Root 可以外网访问 2 update user set host='%' where user='root'; 3 4 --查询修改结果 5 select user,host from user; 6 7 --立即生效 8 flush privileges; 阅读全文

posted @ 2017-09-30 11:05 亡羊补牢 阅读(118) 评论(0) 推荐(0) 编辑

2017年9月5日 #

PostgreSQL 数据库备份

摘要: 例:127.0.0.1:4568:mp:postgres:liu**2020 阅读全文

posted @ 2017-09-05 15:24 亡羊补牢 阅读(170) 评论(0) 推荐(0) 编辑

2017年8月30日 #

delphi fastreport 动态加载图片

摘要: 1 (frxReport1.FindObject('picture1') as TfrxPictureView).Picture.LoadFromFile('d:\c.jpg'); 2 frxReport1.ShowReport(); 阅读全文

posted @ 2017-08-30 08:54 亡羊补牢 阅读(741) 评论(0) 推荐(0) 编辑

2014年11月21日 #

delphi dev 汉化

摘要: 1 //把以下文件复制到记事本中,并保存为DevChs.ini放在exe的目录下 2 //有这个cxLocalizer控件 3 //主窗体创建的时候 4 if (fileexists(ExtractFilePath(Application.ExeName) + 'DevChs.i... 阅读全文

posted @ 2014-11-21 18:36 亡羊补牢 阅读(2511) 评论(1) 推荐(0) 编辑

查询sql2005&2008全部表信息

摘要: 1 如果是查询sql server 2000,把sys.extended_properties修改为SysProperties 2 3 SELECT 4 表名 = CASE WHEN A.COLORDER=1 THEN D.NAME ELSE '' END, 5 表说明 =... 阅读全文

posted @ 2014-11-21 18:33 亡羊补牢 阅读(221) 评论(0) 推荐(0) 编辑

查看最点CPU的语句

摘要: 1 select c.last_execution_time,c.execution_count,c.total_logical_reads,2 c.total_logical_writes,c.total_elapsed_time,c.last_elapsed_time,q.[te... 阅读全文

posted @ 2014-11-21 18:32 亡羊补牢 阅读(212) 评论(0) 推荐(0) 编辑