SELECT [session_id], [blocking_session_id] AS '正在阻塞其他会话的会话ID', DB_NAME([database_id]) AS '数据库名称', [request_id], [cpu_time], [start_time] AS '开始时间', [status] AS '状态', [command] AS '命令', dest.[text] AS 'sql语句', [reads] AS '物理读次数', [writes] AS '写次数', [l
name like 'ja%'; select * from student where name not like '%[j,n]%'; select * from student where name like '%[j,n,a]%'; select * from student where name like '%[^ja,as,on]%'; select * from student where name like '%[ja_on]%'; --in 子查询 , ); --not in
方法如下: 一.为 SQL Server 2005 启用远程连接1. 单击"开始",依次选择"程序"."Microsoft SQL Server 2005"."配置工具",然后单击"SQL Server 外围应用配置器". 2. 在"SQL Server 外围应用配置器"页上,单击"服务和连接的外围应用配置器". 3. 在"服务和连接的外围应用配置器&qu
方法如下: 一.为 SQL Server 2005 启用远程连接 1. 单击"开始",依次选择"程序"."Microsoft SQL Server 2005"."配置工具",然后单击"SQL Server 外围应用配置器". 2. 在"SQL Server 外围应用配置器"页上,单击"服务和连接的外围应用配置器". 3. 在"服务和连接的外围应用配置器&q
SQL Server T-SQL高级查询 高级查询在数据库中用得是最频繁的,也是应用最广泛的. Ø 基本常用查询 --select select * from student; //查询student表中所有字段. --all 查询所有 select all sex from student; --distinct 过滤重复 select distinct sex from student; --count 统计 select count(*) from student; selec
高级查询在数据库中用得是最频繁的,也是应用最广泛的. Ø 基本常用查询 --select select * from student; --all 查询所有 select all sex from student; --distinct 过滤重复 select distinct sex from student; --count 统计 select count(*) from student; select count(sex) from student; select count(di