SQLÖÐisnullº¯ÊýµÄÓ÷¨
Óï·¨£º
isnull(check_expression,replacement_expression)
²ÎÊýcheck_expressionÓëreplacement_expressionÀàÐÍÐèÏàͬ
·µ»ØÖµ£º
Èôcheck_expressionΪnull£¬Ôò·µ»Øreplacement_expression
Èôcheck_expression²»Îªnull£¬Ôò·µ»Øcheck_expression
Ïà¹ØÎĵµ£º
Ò»¸öÏîÄ¿Íê³ÉºóÊý¾Ý¿âÖлáÓкܶàÎÞÓõIJâÊÔÊý¾Ý£¬¿ÉÒÔʹÓÃdelete * ½«Êý¾ÝÈ«²¿É¾³ý£¬µ«×ÔÔö³¤ÁУ¨Ò»°ãÊÇÖ÷¼ü£©»ùÊý²»»á¹éÁ㣬ʹÓÃTRUNCATEº¯Êý¿ÉÒÔ½«±íÖÐÊý¾ÝÈ«²¿É¾³ý£¬²¢ÇÒ½«×ÔÔö³¤ÁлùÊý¹éÁã¡£Ò»¶¨Òª×¢Ò⣬±íÖеÄÊý¾ÝÈ«²¿É¾³ýÁË¡£ËüµÄÓï·¨ÈçÏ£º
TRUNCATE TABLE tableName –ÆäÖÐtableNameÖÐËùÒª²Ù×÷µÄÊý¾Ý
......
.errInfo
{
border:solid 1px #d00;
background:#F7F0F7;
}
1.URLµØÖ··À×¢È룺
//¹ýÂËURL·Ç·¨SQL×Ö·û
var sUrl=location.search.toLowerCase();
var sQuery=sUrl.substring(sUrl.indexOf("=")+1);
re=/select|update|delete|truncate|join|union|exec|insert|drop|count|&r ......
--Óï ¾ä ¹¦ ÄÜ
--Êý¾Ý²Ù×÷
SELECT --´ÓÊý¾Ý¿â±íÖмìË÷Êý¾ÝÐкÍÁÐ
INSERT --ÏòÊý¾Ý¿â±íÌí¼ÓÐÂÊý¾ÝÐÐ
DELETE --´ÓÊý¾Ý¿â±íÖÐɾ³ýÊý¾ÝÐÐ
UPDATE --¸üÐÂÊý¾Ý¿â±íÖеÄÊý¾Ý
--Êý¾Ý¶¨Òå
CREATE TABLE --´´½¨Ò»¸öÊý¾Ý¿â±í
DROP TABLE --´ÓÊý¾Ý¿âÖÐɾ³ý±í
ALTER TABLE --ÐÞ¸ÄÊý¾Ý¿â±í½á¹¹
CREATE VIEW --´´½¨Ò»¸öÊÓͼ
DRO ......
--¾ÛºÏº¯Êý
use pubs
go
select avg(distinct price) --Ëãƽ¾ùÊý
from titles
where type='business'
go
use pubs
go
select max(ytd_sales) --×î´óÊý
from titles
go
use pubs
go
select min(ytd_sales) --×îÐ¡Ê ......
What Is SQL?
SQL (pronounced as the letters S-Q-L or as sequel) is an abbreviation for Structured Query Language. SQL is a language designed specifically for communicating with databases.
Unlike other languages (spoken languages like English, or programming languages like Java or Visual Basic), SQ ......