SqlServerÖвéѯ10µ½20ÌõÖ®¼äµÄÊý¾Ý
²éѯnorthwindÊý¾Ý¿âÖÐordersÖеÄ10µ½20Ìõ¼Ç¼
select top 10 * from orders
where orderid > ( select max(orderid) from (select top 10 orderid from orders order by orderid) as t )
orders±íÖÐÒÑÓÐ×ÔÔö³¤µÄ±êʶÁÐorderid,
ÏȲé³ö±íÖÐÇ°Ê®Ìõ¼Ç¼ÖеÄ×î´óorderid£¬
10ÌõÒÔºóµÄorderid¿Ï¶¨´óÓÚÇ°Ê®ÌõµÄ×î´óid£¬ËùÒÔÔÙwhereÅжϼ´¿É¡£
ÁíÍ⣬Èç¹ûÒª²éѯµÄ±íûÓбêʶÁУ¬Ò²¿ÉÒÔʹÓÃÏÂÃæÕâÖÖ·½·¨£º
select top 20 identity(int ,1,1) as id * into #temp from table
select * from #temp where id>10
Ïà¹ØÎĵµ£º
1.SQLServerµÄ´´½¨½Å±¾ÈçÏ£º
USE [master]
GO
/****** Object: Database [test] Script Date: 10/29/2009 17:43:10 ******/
CREATE DATABASE [test] ON PRIMARY
( NAME = N'test', FILENAME = N'D:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\test.mdf' , S ......
ÔÚwindows 7 ÉÏΪ sqlserver 2008 ÆôÓÃÔ¶³Ì·ÃÎÊ£¬ÐèÒªÁ½¸öÖصãµÄ²½Öè¡£
µÚÒ»²½£ºÆôÓÃsqlserver 2008Ô¶³Ì·ÃÎʵŦÄÜ¡£
´ò¿ªMicrosoft SQL Server 2008-ÅäÖù¤¾ß-SQL Server ÅäÖùÜÀíÆ÷
ÆôÓò¢¼¤»îTcp/IP
È»ºóÖØÆôsqlserver·þÎñ¡£ÕâÑùsqlserver 2008¾Í¿ÉÒÔ½øÐÐÔ¶³ÌÁ¬½ÓÁË¡£µ«ÊÇwin7 ·À»ðǽĬÈÏÊÇ×èÖ¹ÁËsqlsever ¿ª· ......
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlC ......
±¾ÎÄ×ܽáÈçºÎÔÚ.Net WinformºÍ.Net webform(asp.net)Öн«Í¼Æ¬´æÈësqlserverÖв¢¶ÁÈ¡ÏÔʾµÄ·½·¨
1£¬Ê¹ÓÃasp.net½«Í¼Æ¬ÉÏ´«²¢´æÈëSqlServerÖУ¬È»ºó´ÓSqlServerÖжÁÈ¡²¢ÏÔʾ³öÀ´
Ò»£¬ÉÏ´«²¢´æÈëSqlServer
Êý¾Ý¿â½á¹¹
create table test
{
id identity(1,1),
FImage image
}
Ïà¹ØµÄ´æ´¢¹ý³Ì
Create proc UpdateImage ......
»ù±¾ÅäÖÃ
Ò»¡¢ÎļþϵͳҪÇó£º
1¡¢ÖÁÉÙÓжþ¸ö·ÖÇø£»
2¡¢ÏµÍ³·ÖÇø²»Ð¡ÓÚ10G£»
3¡¢·ÖÇø¸ñʽ±ØÐëÊÇNTFS¡£
¶þ¡¢²¹¶¡°²×°ÒªÇó£º
1¡¢ÏÈ°²×°Íê±ÏWINDOWS 2000 SP4+³å»÷²¨+Õðµ´²¨²¹¶¡£»
2¡¢½«WINDOWS 2000²¹¶¡Éý¼¶µ½×îкó²Å¿É°²×°cluster ºÍSQL Server£»
3¡¢SQL Server²¹¶¡ÐèÉý¼¶µ½Service Pack 3¡£
Èý¡¢ClusterÐÅÏ¢£º
1£ ......