打开SQL Server 2012数据库时,对HzWind_2MW数据库名修改为HzWind_2MW_GEM,结果出现如图1所示: 图1 数据库更名时出现error:5030 数据库不能重名名5030的错误,其实很简单原因就是有应用程序正在占用这个连接,使用这样一行命令就可以查询出正在占用的连接.打开数据库,选择New Query,在SQL代码编辑区输入:use master select spid from master.dbo.sysprocesses where dbid=db_id('H
start transaction; select id,rname,free_course_ph,cmp_id,free_date_limit_ph from ebk_students WHERE cmp_id=1105 and free_course_ph>0; UPDATE ebk_students SET free_date_limit_ph=1561824000 where cmp_id=1105 and free_course_ph>0; 确认没有问题,Commit:有问题,Rol
查询数据库中的数据 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Configuration; using System.Data; using System.Data.SqlClient; public partial class _Def
--insert into P_ZPROMOTION_DOC_ITEMS (AKTNR,MATNR,MINGROSS,MCRANK,MCUPRICE,MAXBAKTNR,MAXBPAMONT,MAXBPRICE,MINBAKTNR,MINBPAMONT,MINBPRICE) SELECT AKTNR4,MATNR,MINGROSS,MCRANK,MCUPRICE,MAXBAKTNR,MAXBPAMONT,MAXBPRICE,MINBAKTNR,MINBPAMONT,MINBPRICE FROM