Sql语句学习 一. select playerId, count(playerId) as num from OperateLog_$i where playerId > 0 and rootId = 12 and typeId = 12156 and actionTime >= 1381509000000 and actionTime <= 1381511220000 group by playerId having count(*) > 2; this-- > 可以计…
从外部EXCEl文件导入sqlserver数据库操作命令 reconfigure reconfigure go select * into abc1_1 from OPENROWSET('MICROSOFT.JET.OLEDB.4.0' ,'Excel 5.0;HDR=YES;DATABASE=文件路径',SQLResults$) 注意:文件路径到excel下某个固定的sheet,sheet名字不要有空格 数据库合并 insert into [新数据库名(合并后的)] select [字段] F…