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

¹ØÓÚSQL SERVER Êý¾Ý²ð·Ö

if object_id('tb') is not null drop table tb
go
create table tb([A] varchar(10),[B] int)
insert tb
select 'bcd',1 union all
select 'bcde',2 union all
select 'cd',3
go
¸öÈË·ÖÎöÕâµÀÌâµÄ˼·ÊÇ£º
ͨ¹ýSubstring() À´Ñ­»··Ö¸î B ÁÐϵÄ×Ö·û´®¡£¡£
--ÏëµÃµ½µÄ½á¹û£º
/**
a    b          
---- -----------
b    1
c    1
d    1
b    2
c    2
d    2
e    2
c    3
d    3
£¨ËùÓ°ÏìµÄÐÐÊýΪ 9 ÐУ©
**/
£¨1£©£ºselect
substring(a.A,b.number,1) as a,a.b
from tb a,
master..spt_values b
where b.type='P' and b.number>0
and b.number<len(a.a)
/**
a    b          
---- -----------
b    1
c    1
d    1
b    2
c    2
d    2
e    2
c    3
d    3
£¨ËùÓ°ÏìµÄÐÐÊýΪ 9 ÐУ©
**/
£¨2£©
SELECT TOP 100 ID=IDENTITY(INT,1,1) INTO #NUM from SYS.SYSCOLUMNS A,SYS.SYSCOLUMNS B
SELECT
    A.b,[VALUE]=SUBSTRING(A.a,B.ID,1)
from
    #TB A,#NUM B
WHERE
    b.id <=len(a.a)
/*
b          VALUE
----------- -----
1          b
1          c
1          d
2          b
2          c
2          d
2          e
3          c
3          d


Ïà¹ØÎĵµ£º

²é¿´SQL Server2005°æ±¾¼°²¹¶¡°æ±¾ÐÅÏ¢

SQL Server2005°æ±¾ºÅ£º
Ҫȷ¶¨ËùÔËÐÐµÄ SQL Server 2005 µÄ°æ±¾£¬ÇëʹÓà SQL Server Management Studio Á¬½Óµ½ SQL Server 2005£¬È»ºóÔËÐÐÒÔÏ Transact-SQL Óï¾ä£º(´ËSQLÓï¾äͬÑùÊÊÓÃÓÚSQL2000)
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')
²éѯ½á¹ûÈçÏ£ ......

PL/SQLÖÐJOBÓ÷¨Ð¡½á

Ò»¡¢ÉèÖóõʼ»¯²ÎÊý job_queue_processes
¡¡¡¡sql> alter system set job_queue_processes=n;£¨n>0£©
¡¡¡¡job_queue_processes×î´óֵΪ1000
¡¡¡¡
¡¡¡¡²é¿´job queue ºǫ́½ø³Ì
¡¡¡¡sql>select name,description from v$bgprocess;
¡¡¡¡
¡¡¡¡¶þ£¬dbms_job package Ó÷¨½éÉÜ
¡¡¡¡°üº¬ÒÔÏÂ×Ó¹ý³Ì£º
¡¡¡¡
¡¡ ......

±í½á¹¹ÐÅÏ¢²éѯ sql server 2005


--sql server 2005
-- 1. ±í½á¹¹ÐÅÏ¢²éѯ
-- ========================================================================
-- ±í½á¹¹ÐÅÏ¢²éѯ
-- ×Þ½¨ 2005.08(ÒýÓÃÇë±£Áô´ËÐÅÏ¢)
-- ========================================================================
SELECT
    TableName=CASE WHEN ......

SQLº¯ÊýÖ®ÈÕÆÚºÍʱ¼äº¯Êý

MySQLÖÐÎIJο¼ÊÖ²á- 7 MySQL ÓïÑԲο¼
<!--
body { font-size: 9pt; }
a:hover{color:red;}
a.t1:visited{color:red;}
-->
¶ÔÓÚÿ¸öÀàÐÍÓµÓеÄÖµ·¶Î§ÒÔ¼°²¢ÇÒÖ¸¶¨ÈÕÆÚºÎʱ¼äÖµµÄÓÐЧ¸ñʽµÄÃèÊö¼û7.3.6 ÈÕÆÚºÍʱ¼äÀàÐÍ
¡£
ÕâÀïÊÇÒ»¸öʹÓÃÈÕÆÚº¯ÊýµÄÀý×Ó¡£ÏÂÃæµÄ²éѯѡÔñÁËËùÓмǼ£¬Æädate_col
µÄÖµÊÇÔÚ×îº ......

ÊÖ¹¤ÍêÈ«Ð¶ÔØSQL SERVER2000Êý¾Ý¿â

ÔÚ½øÐвÙ×÷֮ǰ£¬½¨Ò鱸·ÝºÃ×¢²á±íÒÔ¼°ÖØÒªµÄÊý¾Ý¿âÎļþ¡£
£¨1£© ɾ³ýÒÔÏÂ×¢²á±í×ÓÏ
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ Microsoft SQL Server
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSSQLServer
HKEY_LOCAL_MACHINE\SYSTEM\CurrentC ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ