1¡¢Ñ¡ÔñÊʺϵÄOracleÓÅ»¯Æ÷£¨¿ÉÒÔͨ¹ýinit.oraÀïµÄoptimizer_modeÀ´Ö¸¶¨£©
OracleÓÅ»¯Æ÷ÓÐÈýÖÖ£º
1>RULE
2>COST
3>CHOOSE
2¡¢Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò£º
from ºóÃæµÄ±íÃûÊÇ´ÓÓÒÍù× ......
use ISMS
declare @code varchar(200)
declare @EmailContent varchar(200)
select @code=code,@EmailContent=EmailContent from SendEmail where SendEmailFlag='false'
select @code ,@EmailContent
²éѯ½á¹û:
1 zz ÄúºÃ
select code,EmailContent from SendEmail where SendEm ......
±í A
ODR ODR_SPEC DANJIA SUU NUM NUM2 TEL TEL2
p0001 1 100 10   ......
ÓÐÁ½Õűí,°à¼¶±í(classinfo)£¬Ñ§Éú³É¼¨±í(student);
ÎÒÒª²éѯÿ¸ö°à¼¶³É¼¨×î¸ßµÄºÍ³É¼¨×îµÍµÄѧԱµÄ°à¼¶±àºÅ£¬Ñ§Ô±±àºÅ£¬Ñ§Ô±³É¼¨£¬»¹Óвéѯÿ¸ö°à¼¶µÄƽ¾ù³É¼¨
create table ClassInfo (
classID int identity(1,1) primary key ,
classNmae varchar(20)
)
create table students(
sNo int ident ......
²éѯt_Question±íÖÐËùÓÐ×Ö¶ÎÃûµÄǰ4λ£¬ÎªItemµÄ×Ö¶ÎÃû
select left(Item,4) from t_Question
SQL code:
select left(Item,4)Item from t_Question
select left(Item,4) from t_Question
SQL code:
select substring(Item,1,4)Item from t_Question
SQL code:
select left(Item,4) from t_Question
² ......
±ÈÈçÒ»¸ö±íÓÐa,b,c,d£¬e 5¸ö×Ö¶Î
·µ»Ø a=1,b=1,d=1µÄ¼Ç¼Êý·Ö±ðÓжàÉÙ¸ö¡£·µ»ØÒ»¸öÁ½ÁеÄtable
µÚÒ»ÁÐΪ×Ö¶ÎÃû£¬µÚ¶þÁжÔÓ¦¼Ç¼Êý¡£ÓÃÒ»¾äsqlÓï¾ä
SQL code:
select a,count(*) from (
select a from tb where a=1
union all
select b from tb where b=1
union all
select d from tb where d=1
)t group by ......