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

sql´æ´¢

declare @p int
declare @p1 int
declare @count int
set @p=0
set @p1=10
set @count=2
if(@count<>0 or @count<>1)
set @p=@p1*@count-10
SELECT [t1].[userid], [t1].[username], [t1].[userorder]
from (
    SELECT ROW_NUMBER() OVER (ORDER BY [t0].[userorder]) AS [ROW_NUMBER], [t0].[userid], [t0].[username], [t0].[userorder]
    from [dbo].[users] AS [t0]
    ) AS [t1]
WHERE [t1].[ROW_NUMBER] BETWEEN @p + 1 AND @p + @p1
USE [SC1]
GO
/****** Object:  StoredProcedure [dbo].[KB_ExaminationSearch_sp]    Script Date: 05/17/2010 08:55:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:  <peter>
-- Create date: <2010-03-15>
-- Description: <»ñÈ¡·¢²¼¿¼ÊÔÐÅÏ¢>
-- =============================================
ALTER PROCEDURE [dbo].[KB_ExaminationSearch_sp]
 @papecode NVARCHAR(10),
 @BExamdate NVARCHAR(50),
 @EExamdate NVARCHAR(50),
 @usercode  NVARCHAR(50),
 @subccode NVARCHAR(10), 
 @examstae NVARCHAR(50),
 @deptcode NVARCHAR(50),
 @BExamscor NVARCHAR(10),
    @EExamscor NVARCHAR(10),  
 @PageIndex INT,
    @PageSize INT,
 @RecordCount INT OUTPUT
AS
BEGIN
 
 DECLARE @sql  NVARCHAR(4000)
 DECLARE @fromWhere  NVARCHAR(3500)
 
 SET @fromWhere = ' from(SELECT CASE examstat WHEN ''0'' THEN ''δ·¢²¼'' WHEN ''1'' THEN ''ÒÑ·¢²¼'' WHEN ''2'' THEN ''´ýÅúÔÄ'' WHEN ''3'' THEN ''ÒÑÅúÔÄ''  WHEN ''4'' THEN ''Íê³É'' WHEN ''6'' THEN ''¿¼ÊÔÖÐ'' WHEN ''7'' THEN ''´ý¿¼'' ELSE ''ȱ¿¼'' END examstae,kbexam.*,kbpape.papname,aduser.userenam,subccode from PKKBEXAMM0 kbexam LEFT JOIN PKKBPAPEM0 kbpape ON kbexam.papecode = kbpape.papecode LEFT JOIN PKADUSERM0 aduser ON aduser.usercode =  kbexam.usercode)temp WHERE 1 = 1  '
 IF(@usercode


Ïà¹ØÎĵµ£º

SQL ×Ö·û´®½ØȡʾÀý

SELECT LEFT(RTRIM('20080927p1058'),LEN('20080927p1058')-2)
 
SELECT SUBSTRING('20080927p1058',1,LEN('20080927p1058')-2)
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*whit ......

DBF±íÓëSQL Server±íµÄµ¼Èë¡¢µ¼³ö


----------Dbf µ¼Èë Sql Server±í----------
ÒÔϾùÒÔSQL2000¡¢VFP6¼°ÒÔÉϵıíΪÀý
´úÂëµ¼È룺²éѯ·ÖÎöÆ÷ÖÐÖ´ÐÐÈçÏÂÓï¾ä(ÏÈÑ¡Ôñ¶ÔÓ¦µÄÊý¾Ý¿â)
-------------Èç¹û½ÓÊܵ¼ÈëÊý¾ÝµÄSQL±íÒÑ´æÔÚ
--Èç¹û½ÓÊܵ¼ÈëÊý¾ÝµÄSQL±íÒѾ­´æÔÚ
Insert Into ÒѾ­´æÔÚµÄSQL±íÃû Select * from openrowset('MSDASQL','Driver=Microsoft ......

sql server 2008 µÄ°²×°

¸ø´ó¼Ò¸öѧϰÊý¾Ý¿âµÄÈí¼þ°É£¬sql server 2008£¬Õâ¸öÊÇ΢Èí¹«Ë¾µÄ×÷Æ·£¬²»´í£¬Ó¦¸ÃÊǷdz£²»´í£¬ÔÚµçÄÔÉÏ°²×°OracleÊý¾Ý¿âµÄ»°£¬ÄǸö±È½Ï´ó£¬¶øÇÒÔÚÍøÉÏÒ²²»ºÃÏÂÔØ£¬ÒªÊÇÁ¬½Óµ½Ñ§Ð£·þÎñÆ÷µÄ»°£¬Ò²ÊDz»¿ÉÄܵģ¬³ý·Ç´ó¼Ò¾­³£È¥»ú·¿ÉÏ»ú£¬µ«ÊÇÄǸöÒ²²»¿ª£¬·Ï»°²»¶à˵ÁË£¬´ó¼Òȥ΢Èí¹ÙÍøÏÂÔØÒ»¸ösql server 2008µÄÊÔÓðæµÄ°²×°ÎÄ ......

SQL²Ù×÷È«¼¯

ÏÂÁÐÓï¾ä²¿·ÖÊÇMssqlÓï¾ä£¬²»¿ÉÒÔÔÚaccessÖÐʹÓᣠ  
 
SQL·ÖÀࣺ   
DDL—Êý¾Ý¶¨ÒåÓïÑÔ(CREATE£¬ALTER£¬DROP£¬DECLARE)   
DML—Êý¾Ý²Ù×ÝÓïÑÔ(SELECT£¬DELETE£¬UPDATE£¬INSERT)   
DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ