--1.取得数据库所有表的默认值: select t3.name as 表名,t1.name as 字段名,t2.text as 默认值 ,t4.name from syscolumns t1,syscomments t2,sysobjects t3 ,sysobjects t4 where t1.cdefault=t2.id and t3.xtype='u' and t3.id=t1.id and t4.xtype='d' and t4.id=t2.id; --取得数据库中已有默认值的脚本 s
关于在MVC中view中设置默认值,可以象如下设置: 1.关于VIEWMODEL的部分 如果是C# 6.0,网上资料查到说可以 如果语法不支持,只能改回.net 2.0的写法. public class UserType { private ; public int UserTypeID { get { return this._UserType; } set { this._UserType = value; } } } 需要纠正一下的是,在属性上通过Attribute加[DefaultVa
原文:批量修改Ms SqlServer 的default(默认值) --1.取得数据库所有表的默认值: select t3.name as 表名,t1.name as 字段名,t2.text as 默认值 ,t4.name from syscolumns t1,syscomments t2,sysobjects t3 ,sysobjects t4 where t1.cdefault=t2.id and t3.xtype='u' and t3.id=t1.id and t4.xtype='d' a
通过mybatis-plus实现分页,也是很简单,插件大法. 一.分页 1.配置分页插件 把分页的插件也配置到统一的配置类里: @Configuration // 配置扫描mapper的路径 @MapperScan("com.pingguo.mpdemo.mapper") public class MpConfig { // 乐观锁插件 @Bean public OptimisticLockerInterceptor optimisticLockerInterceptor() { re
---------增加是否发布订单 if not exists(select 1 from syscolumns where name='iIsRelease' and id=OBJECT_ID('MCYD')) begin ALTER TABLE MCYD ADD iIsRelease INTEGER DEFAULT 1; ENDGO UPDATE mcyd SET iIsRelease = 1 WHERE iIsRelease IS NULLGO declare @name varchar(