·ÀÖ¹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×¢Èë¹¥»÷µÄΣº¦ÐԺܴó¡£ÔÚ½²½âÆä·ÀÖ¹°ì·¨Ö®Ç°£¬Êý¾Ý¿â¹ÜÀíÔ±ÓбØÒªÏÈÁ˽âÒ»ÏÂÆä¹¥»÷µÄÔÀí¡£ÕâÓÐÀûÓÚ¹ÜÀíÔ±²ÉÈ¡ÓÐÕë¶ÔÐԵķÀÖδëÊ©¡£
¡¡ Ò»¡¢ SQL×¢Èë¹¥»÷µÄ¼òµ¥Ê¾Àý¡£
¡¡¡¡statement := "SELECT * from Users WHERE Value= " + a_variable + "
ÉÏÃæÕâÌõÓï¾äÊÇºÜÆ ......
¶¨Ò壺
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. ......
Ò»¡¢»ù´¡
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
CREATE DATABASE database-name
2¡¢ËµÃ÷£ºÉ¾³ýÊý¾Ý¿â
drop database dbname
3¡¢ËµÃ÷£º±¸·Ýsql server
--- ´´½¨ ±¸·ÝÊý¾ÝµÄ device
USE master
EXEC sp_addumpdevice 'disk', 'testBack', 'c:\mssql7backup\MyNwind_1.dat'
--- ¿ªÊ¼ ±¸·Ý
BACKUP DATABASE pubs TO testBack
4¡¢Ëµ ......
Ò»¡¢³õʼ°²×°ÇëÏȰ²×°sqlserver 2000 ÔÙ°²×°sqlserver 2005
¶þ¡¢Èç¹ûÖÐ;sqlserver2000Óöµ½ÎÊÌâÐèÒªÖØ×°£¬Çë°´ÒÔϲ½Öè
1.ÔÚ¿ØÖÆÃæ°å->Ìí¼Óɾ³ý³ÌÐòÖÐɾ³ýsqlserver2000
2.ÔÚ¹ÜÀí¹¤¾ß->·þÎñÖÐÍ£Ö¹sqlserverµÄËùÓзþÎñ
3.ÊÖ¶¯É¾³ýC:\Program Files\Microsoft SQL ServerĿ¼ÏµÄ80Ŀ¼ºÍMSSQLĿ¼£¨±ØÐëÒªÓеڶþ² ......