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

SQL分页查询

thunder:
1.MYSQL实现
mysql> select * from user;
+----+----------+----------+-----------------+
| ID | username | password | email           |
+----+----------+----------+-----------------+
|  1 | admin    | admin    | abc@yahoo.cn    |
|  2 | thomas   | 159753   | thomas@yahoo.cn |
|  3 | thomas1  | 159753   | thomas@yahoo.cn |
|  4 | huhu     | 159753   | hu@yahoo.cn     |
|  5 | fdg      | dfg      | fdg             |
|  6 | sdf      | sd       | sdf@yahoo.cn    |
|  7 | d        | d        | d@d.cn          |
+----+----------+----------+-----------------+
7 rows in set (0.00 sec)
mysql> select * from user limit 3,2;
+----+----------+----------+-------------+
| ID | username | password | email       |
+----+----------+----------+-------------+
|  4 | huhu     | 159753   | hu@yahoo.cn |
|  5 | fdg      | dfg      | fdg         |
+----+----------+----------+-------------+
2 rows in set (0.00 sec)
mysql>
===================================================
2.MSSQLServer实现
select top 5 function_id,function_name from d_function
where function_id not in (select top 5 function_id from d_function)
6 月统计
7 部门查询
8 公司查询
9 工程招标
10 工程总结


相关文档:

SQL Table

Table-Naming Standards
Table-naming standards, as well as any standard within a business, are critical to
maintaining control. After studying the tables and data in the previous sections, you
probably noticed that each table’s suffix is _TBL. This is a naming standard selected
for use, suc ......

sql server charindex和patindex详解

假如你写过很多程序,你可能偶尔会碰到要确定字符或字符窜串否包含在一段文字中,在这篇文章中,我将讨论使用CHARINDEX和PATINDEX函数来搜索文字列和字符串。我将告诉你这两个函数是如何运转的,解释他们的区别。同时提供一些例子,通过这些例子,你可以可以考虑使用这两个函数来解决很多不同的字符搜索的问题。
 &nb ......

在SQL Server启动时自动执行存储过程

问题
  当sql server启动时,我很想运行一个存储过程。有没有一种方法可以在每次SQL Server服务启动时都会自动执行这个存储过程呢?
  专家解答
  sql Server提供了系统存储过程sp_procoption,这个存储过程可以用于当SQL Server服务启动时指派一个或者多个存储过程自动执行。这是一个很不错的选择,它可以用于多种 ......

Oracle 动态SQL返回单条结果和结果集

Oracle 动态SQL返回单条结果和结果集
1. DDL 和 DML
/**//*** DDL ***/
begin
    EXECUTE IMMEDIATE 'drop table temp_1';
    EXECUTE IMMEDIATE 'create table temp_1(name varchar2(8))';
end;
/**//*** DML ***/
declare
    v_1 varchar2(8);
 & ......

批量修改SQL数据库字段值

正确的修改方法:sql批量修改字段内容的语句
1、没试过,网上搜索的

引用
update '表名' set 要修改字段名 = replace (要修改字段名,'被替换的特定字符','替换成的字符')
2、自己按照一个一个修改是看数据表总结的
例如偶修改自己博客boblog_replies表中的adminrepid和adminreplier字段值:
UPDATE `xxx`.`boblog_ ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号