sqlÓï¾ä µÝ¹é
select s.* from t_info t,t_info_class_relationship s where t.id=s.info_id and t.status is not null and s.class_id in(
select a.id
from T_INFO_CLASS a
start with a.parent_id=39902
connect by prior
a.id =parent_id union
select 39902 from dual)
Ïà¹ØÎĵµ£º
ͨÓñí±í´ïʽ Common Table Expressions
ͨÓñí±í´ïʽ£¨CTE£©ÊÇÒ»¸ö¿ÉÒÔÓɶ¨ÒåÓï¾äÒýÓõÄÁÙʱ±íÃüÃûµÄ½á¹û¼¯¡£ÔÚËûÃǵļòµ¥ÐÎʽÖУ¬Äú¿ÉÒÔ½«CTEÊÓΪÀàËÆÓÚÊÓͼºÍÅÉÉú±í»ìºÏ¹¦ÄܵĸĽø°æ±¾¡£ÔÚ²éѯµÄfrom×Ó¾äÖÐÒýÓÃCTEµÄ·½Ê½ÀàËÆÓÚÒýÓÃÅÉÉú±íºÍÊÓͼµÄ·½Ê½¡£Ö»Ð붨ÒåCTEÒ»´Î£¬¼´¿ÉÔÚ²éѯÖжà´ÎÒýÓÃËü¡£ÔÚCTEµÄ¶¨ÒåÖУ¬¿ÉÒÔÒ ......
1¡¢²é¿´µ±Ç°Êý¾Ý¿âµÄ״̬
SELECT
DATABASEPROPERTY
('pubs'
,'IsFulltextEnabled'
)
2¡¢´ò¿ªFullText¹¦ÄÜ
sp_fulltext_databse
'enable'
¹Ø±Õ´Ë¹¦ÄÜ
& ......
µ±ÎÒÃÇÀûÓÃSQL Server×÷Ϊºǫ́Êý¾Ý¿â½¨ÍøÕ¾µÄʱºò£¬»áÉæ¼°µ½Ô¶³ÌÁ¬½ÓSQL Server·þÎñÆ÷µÄÎÊÌ⣬µ«ÊǾ³£»á³öÏÖÁ¬½Óʧ°ÜµÄÏÖÏó£¬ÏÖÔڰѽâ¾ö°ì·¨¹éÄÉһϣ¬ÒÔ×÷×ܽᡣ
Ò» ¿´ping ·þÎñÆ÷IPÄÜ·ñpingͨ¡£
Õâ¸öʵ¼ÊÉÏÊÇ¿´ºÍÔ¶³Ìsql server 2000·þÎñÆ÷µÄÎïÀíÁ¬½ÓÊÇ·ñ´æÔÚ¡£Èç¹û²»ÐУ¬Çë¼ì²éÍøÂ磬²é¿´ÅäÖ㬵± ......
--> --> (Roy)Éú³É²âÊÔÊý¾Ý
if not object_id('Class') is null
drop table Class
Go
Create table Class([Student] nvarchar(2),[Course] nvarchar(2),[Score] int)
Insert Class
select N'ÕÅÈý',N'ÓïÎÄ',78 union all
select N'ÕÅÈý',N'Êýѧ',87 union all
select N'ÕÅÈý',N'Ó¢Óï',82 union all
sel ......
select count(1) from dictionary;
select * from dba_data_files;
select count(1) from dba_objects t where t.owner='BESTTONE';
select * from dba_tablespaces t where t.tablespace_name='BESTTONE';
select count(1) from dba_tables t where t.owner='BESTTONE';
select t.table_name,t.comments from diction ......