易截截图软件、单文件、免安装、纯绿色、仅160KB

sql常用语句

use myoa
select * from
delete from department where departmentid=1
insert Department(DepartmentId,DepartmentName) values(1,'技术部')
update Department set departmentname='信息技术部' where departmentid=1
--删除表
drop table department
--删除数据库
drop database bai
--统计数据库表中记录
select count(*) as 数据库记录 from Department


相关文档:

sql 2005 存储过程分页 java 代码

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--每页显示记录条数
@currentpage int output,--第几页
@orderid nvarchar(50),--主键排序
@sort int,--排序方式,1表示升序,0表示降序排列 ......

asp.net防sql注入

 using (con)
        {
            con.Open();
            String sqltext = "select * from emp where empno=@empno";
      ......

SQL调优

SQL Server 查询
查询的时候应该尽量按照复合索引中的顺序来做条件查询;(比如IXC中spInterActiveInstance_GetByIDToStat条件and ProcessState<>99的位置);
如果在程序中有For或者是Foreach,在存储过程中又有IF Exists,那就要看是否可以在表中加入复合索引了,IF Not Exists可以转换为IF Exists来使用索引; ......

SQL时间函数

--日期转换参数,值得收藏
select CONVERT(varchar, getdate(), 120 )2004-09-12 11:06:08
select replace(replace(replace(CONVERT(varchar, getdate(), 120 ),'-',''),' ',''),':','')20040912110608
select CONVERT(varchar(12) , getdate(), 111 )2004/09/12
select CONVERT(varchar(12) , getdate(), 112 )20040912 ......

BuildQuery A Simple SQL Query Tool

 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BuildQuery
{
/// <summary>
/// 使用提供的数据建立一个SQL查询
/// </summary>
public class BuildQuery
{
#region 类的变量
int numFieldsCount, ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号