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

SQLº¯Êý¿â

1.×Ö·û´®º¯Êý £º
datalength(Char_expr) ·µ»Ø×Ö·û´®°üº¬×Ö·ûÊý,µ«²»°üº¬ºóÃæµÄ¿Õ¸ñ
length(expression,variable)Ö¸¶¨×Ö·û´®»ò±äÁ¿Ãû³ÆµÄ³¤¶È¡£
substring(expression,start,length) ²»¶à˵ÁË,È¡×Ó´®
right(char_expr,int_expr) ·µ»Ø×Ö·û´®ÓÒ±ßint_expr¸ö×Ö·û
concat(str1,str2,...)·µ»ØÀ´×ÔÓÚ²ÎÊýÁ¬½áµÄ×Ö·û´®¡£datalength(Char_expr) ·µ»Ø×Ö·û´®°üº¬×Ö·ûÊý,µ«²»°üº¬ºóÃæµÄ¿Õ¸ñ
length(expression,variable)Ö¸¶¨×Ö·û´®»ò±äÁ¿Ãû³ÆµÄ³¤¶È¡£
substring(expression,start,length) ²»¶à˵ÁË,È¡×Ó´®
right(char_expr,int_expr) ·µ»Ø×Ö·û´®ÓÒ±ßint_expr¸ö×Ö·û
concat(str1,str2,...)·µ»ØÀ´×ÔÓÚ²ÎÊýÁ¬½áµÄ×Ö·û´®¡£
×Ö·û²Ù×÷Àà £º
upper(char_expr) תΪ´óд
lower(char_expr) תΪСд
UCase(string) ·µ»Ø Variant (String)£¬ÆäÖаüº¬×ª³É´óдµÄ×Ö·û´®¡£
LCase(string) ·µ»Ø×Ö·û´®µÄСдÐÎʽ¡£
space(int_expr) Éú³Éint_expr¸ö¿Õ¸ñ
replicate(char_expr,int_expr) ¸´ÖÆ×Ö·û´®int_expr´Î
reverse(char_expr) ·´×ª×Ö·û´®
stuff(char_expr1,start,length,char_expr2) ½«×Ö·û´®char_expr1ÖÐµÄ´Ó start¿ªÊ¼µÄlength¸ö×Ö·ûÓÃchar_expr2´úÌæ
ltrim(char_expr) rtrim(char_expr) È¥µô¿Õ¸ñ
ascii(char) char(ascii) Á½º¯Êý¶ÔÓ¦,È¡asciiÂë,¸ù¾ÝasciiÂðÈ¡×Ö·û
×Ö·û´®²éÕÒ £º
charindex(char_expr,expression) ·µ»Øchar_exprµÄÆðʼλÖÃ
patindex("%pattern%",expression) ·µ»ØÖ¸¶¨Ä£Ê½µÄÆðʼλÖÃ,·ñÔòΪ0
locate(substr,str,pos) ·µ»Ø×Ó´®substrÔÚ×Ö·û´®strµÚÒ»¸ö³öÏÖµÄλÖÃ
2.Êýѧº¯Êý
abs(numeric_expr) Çó¾ø¶ÔÖµ
ceiling(numeric_expr) È¡´óÓÚµÈÓÚÖ¸¶¨ÖµµÄ×îСÕûÊý
exp(float_expr) È¡Ö¸Êý
floor(numeric_expr) СÓÚµÈÓÚÖ¸¶¨ÖµµÃ×î´óÕûÊý
power(numeric_expr,power) ·µ»Øpower´Î·½
rand([int_expr]) Ëæ»úÊý²úÉúÆ÷
round(numeric_expr,int_expr) °²int_expr¹æ¶¨µÄ¾«¶ÈËÄÉáÎåÈë
sign(int_expr) ¸ù¾ÝÕýÊý,0,¸ºÊý,,·µ»Ø+1,0,-1
sqrt(float_expr) ƽ·½¸ù
exp(float x):ÇóeµÄx´ÎÃÝ
tan(float x)£º¼ÆËãx£¨»¡¶È±íʾ£©µÄÕýÇÐÖµ¡£
atan(float x):Çóx£¨»¡¶È±íʾ£©µÄ·´ÕýÇÐÖµ
cos(float x):Çóx£¨»¡¶È±íʾ£©µÄÓàÏÒÖµ
acos(float x):Çóx£¨»¡¶È±íʾ£©µÄ·´ÓàÏÒÖµ
sin(float x):¼ÆËãx£¨»¡¶È±íʾ£©µÄÕýÏÒÖµ¡£
asin(float x):Çóx£¨»¡¶È±íʾ£©µÄ·´ÕýÏÒÖµ
fabs(float x):Ç󸡵ãÊýxµÄ¾ø¶ÔÖµ
fmod(float x, float y):¼ÆËã


Ïà¹ØÎĵµ£º

ORACLE SQLÐÔÄÜÓÅ»¯´ó×ܽá

ORACLE SQLÐÔÄÜÓÅ»¯´ó×ܽá
1£© Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)£º
" ?; J) n+ v8 J- v" q    OracleµÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬from×Ó¾äÖÐдÔÚ×îºóµÄ±í(»ù´¡±í driving table)½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏÂ,Äã±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í¡ ......

SQL³£ÓÃÈÕÆÚʱ¼ä´¦Àíº¯Êý

×î½üÔÚÔÚÒ»µçÁ¦ÏµÍ³£¬ÀïÃæÓõ½±¨±í£¬¾­³£ÐèÒª¶ÔSQLÈÕÆÚ½øÐвÙ×÷¡£ÏÖÔÚ½«Ò»Ð©³£ÓõÄSQLÈÕÆÚ²Ù×÷º¯Êý¼ÇÏÂ
/**//**//**//* datepart()º¯ÊýµÄʹÓà                     ¡¡¡¡
* datepart()º¯Êý¿ÉÒÔ·½±ãµÄÈ¡µ ......

¾«ÃîSQLÓï¾äÕûÀí

Ò»¡¢»ù´¡
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
CREATE DATABASE database-name
2¡¢ËµÃ÷£ºÉ¾³ýÊý¾Ý¿â
drop database dbname
3¡¢ËµÃ÷£º±¸·Ýsql server
--- ´´½¨ ±¸·ÝÊý¾ÝµÄ device
USE master
EXEC sp_addumpdevice 'disk', 'testBack', 'c:mssql7backupMyNwind_1.dat'
--- ¿ªÊ¼ ±¸·Ý
BACKUP DATABASE pubs TO testBack ......

SQLÓï¾ä´óÈ«(3)

--Óï ¾ä¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¹¦ ÄÜ
--Êý¾Ý²Ù×÷
SELECT¡¡¡¡¡¡--´ÓÊý¾Ý¿â±íÖмìË÷Êý¾ÝÐкÍÁÐ
INSERT¡¡¡¡¡¡--ÏòÊý¾Ý¿â±íÌí¼ÓÐÂÊý¾ÝÐÐ
DELETE¡¡¡¡¡¡--´ÓÊý¾Ý¿â±íÖÐɾ³ýÊý¾ÝÐÐ
UPDATE¡¡¡¡¡¡--¸üÐÂÊý¾Ý¿â±íÖеÄÊý¾Ý
--Êý¾Ý¶¨Òå
CREATE TABLE¡¡¡¡--´´½¨Ò»¸öÊý¾Ý¿â±í
DROP TABLE¡¡¡¡ --´ÓÊý¾Ý¿âÖÐɾ³ý±í
ALTER ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ