sqlÓï¾ä¹éÄÉ£¨oracle£©
¶ÔÈÕ³£¹¤×÷ÖÐÓõ½µÄ¸Ð¾õÓÐÓõÄsqlÓï¾ä×ö¸ö¹éÄÉ£¬ÓÃÓÚ½ñºóιÊ֪С£
*¸´ÖÆ±í£º
create table tablename as select * from table_src;
create table tablename as select * from table_src where 1 <> 1; --Ö»¸´ÖƱí½á¹¹
Ïà¹ØÎĵµ£º
1.
Ä£ºý²éѯЧÂʺܵͣº
ÔÒò£º
like
±¾ÉíЧÂʾͱȽϵͣ¬Ó¦¸Ã¾¡Á¿±ÜÃâ²éѯÌõ¼þʹÓÃ
like
£»¶ÔÓÚ
like ‘%...%’
£¨È«Ä£ºý£©ÕâÑùµÄÌõ¼þ£¬ÊÇÎÞ·¨Ê¹ÓÃË÷ÒýµÄ£¬È«±íɨÃè×ÔȻЧÂʺܵͣ»ÁíÍ⣬ÓÉÓÚÆ¥ÅäËã·¨µÄ¹Øϵ£¬Ä£ºý²éѯµÄ×ֶ㤶ÈÔ½´ó£¬Ä£ºý²éѯЧÂÊÔ½µÍ¡£
½â¾ö°ì· ......
Ò»¡¢ÄÚ²¿º¯Êý
1¡¢ÄÚ²¿ºÏ¼Æº¯Êý
1£©COUNT£¨*£© ·µ»ØÐÐÊý
2£©COUNT£¨DISTINCT COLNAME£©·µ»ØÖ¸¶¨ÁÐÖÐΨһֵµÄ¸öÊý
3£©SUM£¨COLNAME/EXPRESSION£©·µ»ØÖ¸¶¨Áлò±í´ïʽµÄÊýÖµºÍ£»
4£©SUM£¨DISTINCT COLNAME£© ·µ»ØÖ¸¶¨ÁÐÖÐΨһֵµÄºÍ
5£©AVG£¨COLNAME/EXPRESSION£©·µ»ØÖ¸¶¨Áлò±í´ïʽÖеÄÊýֵƽ¾ùÖµ
6£©AV ......
Sql server2005ÓÅ»¯²éѯËÙ¶È51·¨²éѯËÙ¶ÈÂýµÄÔÒòºÜ¶à£¬³£¼ûÈçϼ¸ÖÖ£¬´ó¼Ò¿ÉÒԲο¼Ï¡£
I/OÍÌÍÂÁ¿Ð¡£¬ÐγÉÁËÆ¿¾±Ð§Ó¦¡£
¡¡¡¡Ã»Óд´½¨¼ÆËãÁе¼Ö²éѯ²»ÓÅ»¯¡£
¡¡¡¡ÄÚ´æ²»×ã¡£
¡¡¡¡ÍøÂçËÙ¶ÈÂý¡£
¡¡¡¡²éѯ³öµÄÊý¾ÝÁ¿¹ý´ó(¿ÉÒÔ²ÉÓöà´Î²éѯ£¬ÆäËûµÄ·½·¨½µµÍÊý¾ÝÁ¿)¡£
¡¡¡¡Ëø»òÕßËÀËø(ÕâÒ²ÊDzéѯÂý×î³£¼ûµÄÎÊÌ ......
Êýѧº¯Êý
1.¾ø¶ÔÖµ
S:select abs(-1) value
O:select abs(-1) value from dual
2.È¡Õû(´ó)
S:select ceiling(-1.001) value
O:select ceil(-1.001) value from dual
3.È¡Õû£¨Ð¡£©
S:select floor(-1.001) value
O:select floor(-1.001) value from dual
4.È¡Õû£¨½ØÈ¡£©
S:select cast(-1.002 as in ......
Êý¾Ý²ã´ÎµÄ¸ÅÄî:
Êý¾Ý²ã´ÎÊDZí´ïÊý¾ÝµÄÒ»ÖÖÖØÒª¹Øϵ£¬ÔÚÊý¾Ý¿âµÄÉè¼ÆÖУ¬È磺×éÖ¯½á¹¹·Ö½â¡¢¹¤×÷ÈÎÎñ·Ö½â¡¢ÐÐÕþÇø»®µÄ·Ö½âµÈ¶¼ÊDzã´Î¹ØϵÊý¾ÝµÄµäÐÍʵÀý¡£
±í´ï²ã´Î¹ØϵµÄÊý¾ÝÒ»°ãÐèҪʵÏÖÈçÏÂÊôÐÔ£º
1.²ã´ÎµÄ×î´ó¼¶Áª²ã´ÎÊý¡£È磺Öйú£>ºþÄÏÊ¡->³¤É³ÊÐ->Ó껨Çø£¬¾ÍÊÇ4²ã¡£
2.ÄÜ·´Ó³Í¬Ò»² ......