·ÀÖ¹sql×¢Èë ÊÊÓÃÓÚ URL ID ´¿Êý×Ö
Àý×Ó£º int id = Convert.ToInt32(replace((Request.QueryString["id"]), ""));
public static string replace(string str, string str2)
{
str = str.Replace(";", str2);
str = str.Replace("&", str2);
str = str.Replace("<", str2);
str = str.Replace(">", str2);
str = str.Replace("'", str2);
str = str.Replace("--", str2);
str = str.Replace("/", str2);
str = str.Replace("%", str2);
str = str.Replace("~", str2);
str = str.Replace(",", str2);
str = str.Replace("`", str2);
str = str.Replace("!", str2);
str = str.Replace("@", str2);
str = str.Replace("#", str2);
str = str.Replace("$", str2);
str = str.Replace("^", str2);
str = str.Replace("*", str2);
str = str.Replace("(", str2);
str = str.Replace(")", str2);
str = str.Replace("+", str2);
str = str.Replace(":", str2);
str = str.Replace("<", str2);
str = str.Replace(">", str2);
str = str.Replace("?", str2);
 
Ïà¹ØÎĵµ£º
SQL :Structured Query Language½á¹¹»¯²éѯÓïÑÔ
1.Select [Predicate] *(filed) from table/view Where ... Group by ... Having... Order by ... With ...
Predicate£º°üÀ¨all/Distinct/Distinctrow/Top£¬ÏÞÖÆ²éѯ½á¹û£»
As¿ÉÒÔÃüÃû±ðÃû£»
Where ... Ö¸¶¨Ä³Ð©Ìõ¼þ£¬½«ËùÓ ......
Êý¾ÝÀàÐÍ
ÀàÐÍ
Ãè Êö
bit
ÕûÐÍ
bit Êý¾ÝÀàÐÍÊÇÕûÐÍ£¬ÆäÖµÖ»ÄÜÊÇ0¡¢1»ò¿ÕÖµ¡£ÕâÖÖÊý¾ÝÀàÐÍÓÃÓÚ´æ´¢Ö»ÓÐÁ½ÖÖ¿ÉÄÜÖµµÄÊý¾Ý£¬ÈçYes »òNo¡¢True »òFa lse ¡¢On »òOff
int
ÕûÐÍ
int Êý¾ÝÀàÐÍ¿ÉÒÔ´æ´¢´Ó- 231(-2147483648)µ½231 (2147483 ......
¶¨Ò壺
create table ±íÃû£¨ÁÐÃû1 ÀàÐÍ [not null] [,ÁÐÃû2 ÀàÐÍ] [not null]£¬···£© [ÆäËû²ÎÊý]
Ð޸ģº
alter table ±íÃû add ÁÐÃû ÀàÐÍ
alter table ±íÃû rename column ÔÁÐÃû to ÐÂÁÐÃû
alter table ±íÃû alter column ÁÐÃû ÀàÐÍ [£¨¿í¶È£© [£¬Ð¡Êýλ]]
alter table ±íÃû drop column ÁÐÃû
......
SQL SERVERµÇ¼Óû§ÔÚ·þÎñÆ÷ÉϵÄȨÏÞ
Ò»¸öµÇ¼Óû§µ½µ×ÔÚSQL SERVERʵÀýÉÏÓÐʲôÑùµÄȨÏÞ£¬ÏÂÃæÒÔSQL SERVER2005ΪÀýÀ´Ï¸Êýһϡ£
Ò»£®
Ê×ÏȲ鿴¸ÃµÇ¼Óû§ÊôÓÚÄĸö¹Ì¶¨·þÎñÆ÷½ÇÉ«¡£ËùÓÐSQL SERVERµÄµÇ¼Óû§ºÍ½ÇÉ«¶¼»áÔÚmaster.sys.server_principalÊÓͼÉÏÓÐÒ»Ìõ¼Ç¼¡£¶ø¼Ç¼µÇ¼Óû§ÊôÓÚʲô·þÎñÆ÷½ÇÉ«µÄÊÓͼÊÇmaster. ......
ÍâÁª½Ó:ÍâÁª½Ó¿ÉÒÔÊÇ×óÏòÍâÁª½Ó¡¢ÓÒÏòÍâÁª½Ó»òÍêÕûÍⲿÁª½Ó¡£
ÔÚ from ×Ó¾äÖÐÖ¸¶¨ÍâÁª½Óʱ£¬¿ÉÒÔÓÉÏÂÁм¸×鹨¼ü×ÖÖеÄÒ»×éÖ¸¶¨£º
LEFT JOIN »ò LEFT OUTER JOIN;
×óÏòÍâÁª½ÓµÄ½á¹û¼¯°üÀ ......