随笔分类 - 数据库
摘要:FOR INSERT与AFTER INSERT的区别 
阅读全文
摘要:##### 查看被锁表: ``` select spId from master..SysProcesses where db_Name(dbID) = '数据库名称' and spId @@SpId and dbID 0 ``` ##### 解除锁: ``` exec ('Kill '+cast(
阅读全文
摘要:创建表 CREATE TABLE WorkOrderTimeFlowRecord( Id int identity(1,1) primary key, CreatedTime datetime NULL, CreatedUserId varchar(50) NULL, UpdatedProgress
阅读全文
摘要:一、DQL -- 1. +号在sql server中既可以作为运算符,也可以作为字符拼接,而在mysql中只有运算符功能 -- sql server select '1'+'2'; -- '12' select 1+2; -- 3 --mysql SELECT '1'+'2'; -- 3 SELEC
阅读全文
摘要:1、登录mysql mysql -h localhost -P 3306 -u root -p 2、退出mysql到dos exit或quit 3、退出输入模式 \c 4、退出输入模式,sql带引号的 '\c 5、查看数据库--注意结尾有;分号,并且不是show database show data
阅读全文
摘要:一、MySQL基本概念:https://baike.baidu.com/item/MySQL%E6%95%B0%E6%8D%AE%E5%BA%93/10991669?fr=aladdin 二、MySQL下载:https://downloads.mysql.com/archives/community
阅读全文
摘要:select top 10 --(case when zb.Order_CreatedOn is null then '' when zb.Order_CreatedOn'1900-01-01' then zb.Order_CreatedOn end) as Order_CreatedOn,*--datetime类型不能转成'',如果转成'',返回给程序就是1900-01-01,''这种空字...
阅读全文