Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ORACLEÖÐÓÃrownum·ÖÒ³²¢ÅÅÐòµÄSQLÓï¾ä

µÚÒ»ÖÖ£º 
select b.* from
 ( select a.*, rownum row_num from
   (select t.* from A05_ORGANIZATION t order by org_name_en asc) a
  ) b
 where b.row_num  between 1 and 5  order by b.row_num asc
µÚ¶þÖÖ£¨¸ü¸ßЧ£©£º
select b.* from
 ( select a.*, rownum row_num from
   (select t.* from A05_ORGANIZATION t order by org_name_en asc) a
   where rownum <=5
  ) b
 where b.row_num  >=1 order by b.row_num asc


Ïà¹ØÎĵµ£º

SQL ÖÐWith as µÄÓ÷¨

Ò»£®WITH ASµÄº¬Òå
WITH AS¶ÌÓҲ½Ð×ö×Ó²éѯ²¿·Ö£¨subquery factoring£©£¬¿ÉÒÔÈÃÄã×öºÜ¶àÊÂÇ飬¶¨ÒåÒ»¸öSQLƬ¶Ï£¬¸ÃSQLƬ¶Ï»á±»Õû¸öSQLÓï¾äËùÓõ½¡£ÓеÄʱºò£¬ÊÇΪÁËÈÃSQLÓï¾äµÄ¿É¶ÁÐÔ¸ü¸ßЩ£¬Ò²ÓпÉÄÜÊÇÔÚUNION ALLµÄ²»Í¬²¿·Ö£¬×÷ΪÌṩÊý¾ÝµÄ²¿·Ö¡£
Ìرð¶ÔÓÚUNION ALL±È½ÏÓÐÓá£ÒòΪUNION ALLµÄÿ¸ö²¿·Ö¿ÉÄÜÏàͬ£¬µ ......

SQL 2000Óû§×Ô¶¨Ò庯Êý

Ò»¡£SQL Server µÄÈýÖÖ×Ô¶¨Ò庯Êý
“×Ô¶¨Ò庯Êý”ÊÇÎÒÃÇƽ³£µÄ˵·¨£¬¶ø“Óû§¶¨ÒåµÄº¯Êý”ÊÇ SQL Server ÖÐÊéÃæµÄ˵·¨¡£
SQL Server 2000 ÔÊÐíÓû§´´½¨×Ô¶¨Ò庯Êý£¬×Ô¶¨Ò庯Êý¿ÉÒÔÓзµ»ØÖµ¡£
×Ô¶¨Ò庯Êý·ÖΪ£º±êÁ¿Öµº¯Êý»ò±íÖµº¯Êý
Èç¹û RETURNS ×Ó¾äÖ¸¶¨Ò»ÖÖ±êÁ¿Êý¾ÝÀàÐÍ£¬Ôòº¯ÊýΪ±êÁ¿Öµº¯Êý¡£¿É ......

Oracle Á¬½ÓÔ¶³ÌÊý¾Ý¿â

¹«Ë¾Ê¹ÓÃlinux¿ª·¢»ú½øÐгÌÐò¿ª·¢Ê±£¬ÓÉÓÚ¿ª·¢ÓÃOracleÊý¾Ý¿âÊÇÓÉÈÕ·½Ìṩ£¬ËùÒÔ¾­³£Ê¹ÓÃsqlplusÁ¬½Óµ½Ô¶³ÌÊý¾Ý¿âÉϽøÐпª·¢,ÀýÈ磺
sqlplus  username/password@servicename
ÓÚÊÇÏ룬ÓÃÎÒµÄÁ½Ì¨µçÄÔË«»ú»¥ÁªÊÔÒ»ÊÔ£¬Ò²Íæ¸ö“Ô¶³ÌÁ¬½Ó”¡£ÊµÑéÈçÏ£º
Ê×ÏÈÔÚÎÒµĄ̈ʽ»úÉÏ°²×°ÁËOracle9iµÄÊý¾Ý¿â¹ÜÀíϵͳ£¬ ......

SQl XmlºÍC# XmlÊý¾ÝµÄÒ»µã²Ù×÷×ܽá

SQl XmlºÍC# XmlÊý¾ÝµÄÒ»µã²Ù×÷×ܽá
ÔÚ´ËÉêÃ÷XmlÊÇInfoSetÊý¾Ý²»ÊÇ×Ö·û´®£¬ËùÒÔÔÚ´ËÇ¿ÁÒ·´¶ÔÓÃstringÆ´½Óxml¡£Êý¾Ý¿â¿ÉÒÔ´æ·ÅxmlÀàÐÍÊý¾Ý£¬ÄÇô¸ÃÊý¾ÝµÄ¾ßÌå²Ù×÷ÓÖÈçºÎÁË¡£
1.Ê×ÏȽ¨Á¢Ò»Õź¬ÓÐxmlÊý¾ÝÀàÐ͵ıí
CREATE TABLE [dbo].[TestXml](
 [ID] [bigint] IDENTITY(1,1) NOT NULL,
 [Message] [xml] NULL ......

SQL server 2008 ´´½¨Ö÷¼üΪ×ÔÔöÁеıí

ʹÓÃTranact-SQL ±àд´úÂëÀ´´´½¨Ò»¸öÐÂ±í£º
 
USE [OnlineJudge]
GO
/****** Object: Table [dbo].[User1] Script Date: 05/17/2010 14:05:06 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[User2](/*notice convert the tablename*/
[num] [int]IDENTITY(1,1) NOT N ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ