Sql»ù±¾Óï¾äµÄѧϰ
--²éѯÿ¸öÈ˶©·¹µÄ´ÎÊý
select username as ÐÕÃû, count(*) as ´ÎÊý from orderitems group by UserName having count(*)=1
order by ÐÕÃû desc
select distinct username as δע²áÐÕÃû from orderitems
where username not in (select [Name] from Person)
select distinct username as ÒÑ×¢²áÐÕÃû from orderitems where username
in (select [Name] from Person)
--Ë÷ÒýΪ31-40µÄÊý¾Ý
select top 10 * from orderitems where ID not in (select top 30 ID from orderitems)
--¸´ÖÆÊý¾Ý
insert into distinctselect(UserName,State,OrderTime) select UserName,State,OrderTime from orderitems
--È¥³ýËùÓÐÖØ¸´µÄ¼Ç¼(ÍêÈ«ÖØ¸´)
select distinct UserName ,ID, State,OrderTime into #Table1 from [distinctselect]
delete from [distinctselect]
insert into [distinctselect](UserName,State,OrderTime) select UserName,State,OrderTime from #Table1
drop table #Table1
--ɾ³ýijÁÐÖØ¸´µÄ¼Ç¼
delete t
from [distinctselect] t
where exists (
select 1 from [distinctselect] where username=t.username and id<t.id)
select * from [distinctselect] order by username
delete from [distinctselect]
Ïà¹ØÎĵµ£º
½âѹ SQLServer2005SP3-KB955706-x86-CHS.exe Îļþ(ʹÓà WinRAR ¿ÉÖ±½Ó½âѹ,»òʹÓà /extract)
½âѹºóÎļþ¼Ð ËÑË÷ “*.msi *.msp” £¬È»ºó¸´ÖÆËùÓÐËÑË÷µ½µÄÎļþ ·Åµ½ D:\SQL2005\SP3 ÖÐ.
ÌáÈ¡ cs_sql_dev_all_dvd.iso(SQL Server 2005 ¿ª·¢°æ) ÖÐµÄ x86 °æ±¾£¬·Åµ½ D:\SQL2005\MSSQL ÖУ»´Ëʱ D:\SQL2005\M ......
Ó¦ÓÃIDS·ÀÖ¹SQL×¢Èë¹¥»÷
http://www.cnhacker.com/Hacker/Skills/200807/t20080731_6187.html
Ŀǰ£¬Õë¶ÔÓ¦Óü°Æäºǫ́Êý¾Ý¿âµÄÓ¦Óü¶ÈëÇÖÒѾ±äµÃÔ½À´Ô½²þâ±£¬ÈçSQL×¢Èë¡¢¿çÕ¾µã½Å±¾¹¥»÷ºÍδ¾ÊÚȨµÄÓû§·ÃÎʵȡ£ËùÓÐÕâЩÈëÇÖ¶¼ÓпÉÄÜÈÆ¹ýǰ̨°²È«ÏµÍ³²¢¶ÔÊý¾ÝÀ´Ô´·¢Æð¹¥»÷¡£
ΪÁ˶Ը¶ÕâÀàÍþв£¬ÐÂÒ»¼¶±ðµÄ°²È«ÍÑÓ±¶ø³ö£ ......
Ò».×¢ÊÍ
-- µ¥ÐÐ×¢ÊÍ£¬´ÓÕâµ½±¾ÐнáÊøÎª×¢ÊÍsql Óï·¨£¬ÀàËÆC++£¬c#ÖÐ//
/* … */ ¶àÐÐ×¢ÊÍ£¬ÀàËÆC++£¬C#ÖÐ/* … */
¶þ.±äÁ¿£¨int£¬ smallint£¬ tinyint£¬ decimal£¬float£¬real£¬ money £¬smallmoneysql Óï·¨£¬ text £¬image£¬ char£¬ varchar¡£¡£¡£¡£¡£¡££©
Óï·¨£º
DECLARE
{
{@local_variable data_t ......
ÒÔÏÂÊÇÒ»¸ö²éѯIPµØÖ·¹éÊôµØµÄCLR´æ´¢¹ý³Ì£¬Èý²½£º
1¡¢ÓÃC#À´×öDLL£¬´úÂëÈçÏ£º
//====================================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlTypes;
using System.Data.SqlClient;
using Microsoft.Sq ......
Oracleµ÷ÕûÓëSQL Óï¾äµÄµ÷ÓŵĹØÏµ
ÔÚOracleµ÷ÕûÖÐÎÒÃÇ»¹»áÉæ¼°µ½SQL Óï¾äµÄµ÷ÓÅ£¬ÎÒÃǽÓÏÂÀ´¾ÍÀ´¿´ÒÔÏ嵀 SQL Óï¾äµÄµ÷ÓÅ¡£ÎÒÃǶ¼ÖªµÀ Oracle ÖÐµÄ SQL µ÷ÓÅÊÇÒ»¸öÏ൱¸´ÔÓµÄÖ÷Ì⣬ÉõÖÁÊÇÐèÒªÕû±¾ÊéÀ´½éÉÜ Oracle SQL µ÷ÓŵÄϸ΢²î±ð¡£
²»¹ýÓÐһЩ»ù±¾µÄ¹æÔòÊÇÿ¸ö Oracle DBA ¶¼ÐèÒª¸ú´ÓµÄ£¬ÕâЩ¹æÔò¿ÉÒÔ¸ÄÉÆËûÃÇϵͳµÄ ......