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

²Ù×÷SQL Server MobileÊý¾Ý¿âµÄ³£ÓÃC#´úÂë

 
window.onerror = function() { return true; };
body {margin:0;overflow:auto;font:normal 14px Verdana;background:#fff;padding:2px 4px 0;}body, p, font, div, li { line-height: 150%;}body, td, th {color:#000000;}.i {width:100%;*width:auto;table-layout:fixed;}pre {white-space: pre-wrap;white-space: -moz-pre-wrap;white-space: -pre-wrap;white-space: -o-pre-wrap;word-wrap: break-word;}a { color: -moz-hyperlinktext !important;text-decoration: -moz-anchor-decoration;}
²Ù×÷SQL Server MobileÊý¾Ý¿âµÄ³£ÓÃC#´úÂë
1. ´´½¨Êý¾Ý¿â
// ´´½¨Êý¾Ý¿â
File.Delete("Test.sdf");
SqlCeEngine engine =
new SqlCeEngine(
    "Data
Source='Test.sdf';LCID=1033;Password=\"s$;2'!dS64\";Encrypt=TRUE;");
engine.CreateDatabase();
2. ÑéÖ¤ºÍÐÞ¸´Êý¾Ý¿â
// ÑéÖ¤ºÍÐÞ¸´Êý¾Ý¿â
SqlCeEngine engine = new SqlCeEngine("Data
Source=AdventureWorks.sdf");
if (false == engine.Verify())
{
   
MessageBox.Show("Database is corrupted.");
    engine.Repair(null,
RepairOption.RecoverCorruptedRows);
}
3. ѹËõÊý¾Ý¿â
// ѹËõÊý¾Ý¿â
// ͨ¹ý´ÓÏÖÓÐÎļþн¨Êý¾Ý¿âÎļþÀ´»ØÊÕ SQL Server Mobile
Êý¾Ý¿âÖÐÀ˷ѵĿռ䡣
// ´Ë·½·¨»¹¿ÉÓÃÀ´¸ü¸ÄÊý¾Ý¿âµÄÅÅÐò˳Ðò¡¢¼ÓÃÜ»òÃÜÂëÉèÖá£
//
¸ÃÁ¬½Ó×Ö·û´®Ö¸¶¨Ò»¸öÖ¸Ïò½«ÓÉ´Ë·½·¨´´½¨µÄÄ¿±êÊý¾Ý¿âµÄÁ¬½Ó¡£
// Èç¹ûÖ¸¶¨µÄÊý¾Ý¿âÒѾ­´æÔÚ»òÕß¾ßÓÐÏàͬÃû³ÆµÄÁíÒ»ÎļþÒѾ­´æÔÚ£¬Ôò»áÒý·¢Òì³£¡£
//
Èç¹ûΪÁ¬½Ó×Ö·û´®´«µÝ¿Õ×Ö·û´®£¬ÔòеÄÊý¾Ý¿âÎļþ½«¸Äд¾ÉµÄÊý¾Ý¿âÎļþ£¬
// µ«Ãû³Æ±£³Ö²»±ä¡£
SqlCeEngine engine = new
SqlCeEngine("Data
Source=AdventureWorks.sdf");
//engine.Compact(null);
engine.Compact("Data
Source=; Password=a@3!7f$dQ
;");
4. ÊÕËõÊý¾Ý¿â
// ÊÕËõÊý¾Ý¿â
// ͨ¹ý½«¿ÕÒ³Òƶ¯µ½ÎļþµÄ½áβȻºó½Ø¶Ï¸ÃÎļþ£¬
// À´»ØÊÕ SQL Server Mobile
Êý¾Ý¿âÖÐÀ˷ѵĿռ䡣
// Óë Compact ·½·¨²»Í¬£¬Shrink ·½·¨²»´´½¨ÁÙʱÊý¾Ý¿âÎļþ£¬
//
¶øÊǽ«ËùÓпÕÒ³ºÍδ·ÖÅäµÄÒ³¶¼ÒƵ½ÁËÎļþµÄ½áβ£¬È»ºó½Ø¶Ï£¬´Ó¶ø¼õСÊý¾Ý¿âµÄ×Ü´óС¡£
SqlCeEngine engine = new
SqlCeEngine("Data Source=AdventureWorks.


Ïà¹ØÎĵµ£º

SQL ALTER TABLE Óï¾ä

³ö´¦£ºhttp://www.w3school.com.cn/sql/sql_alter.asp ALTER TABLE Óï¾ä ALTER TABLE Óï¾äÓÃÓÚÔÚÒÑÓеıíÖÐÌí¼Ó¡¢Ð޸Ļòɾ³ýÁС£ SQL ALTER TABLE Óï·¨ ÈçÐèÔÚ±íÖÐÌí¼ÓÁУ¬ÇëʹÓÃÏÂÁÐÓï·¨: ALTER TABLE table_name
ADD column_name datatype
Ҫɾ³ý±íÖеÄÁУ¬ÇëʹÓÃÏÂÁÐÓï·¨£º
ALTER TABLE table_name
DROP COLUM ......

SQL ServerÖеÄNullÖµ½âÎö

NULL
ÊÇÊý¾Ý¿âÖÐÌØÓеÄÊý¾ÝÀàÐÍ£¬µ±Ò»Ìõ¼Ç¼µÄij¸öÁÐΪ
NULL
£¬Ôò±íʾÕâ¸öÁеÄÖµÊÇδ֪µÄ¡¢ÊDz»È·¶¨µÄ¡£¼ÈÈ»ÊÇδ֪µÄ£¬¾ÍÓÐÎÞÊýÖֵĿÉÄÜÐÔ¡£Òò´Ë£¬
NULL
²¢²»ÊÇÒ»¸öÈ·¶¨µÄÖµ¡£
ÕâÊÇ
NULL
µÄÓÉÀ´¡¢Ò²ÊÇ
NULL
µÄ»ù´¡£¬ËùÓкÍ
NULL
Ïà¹ØµÄ²Ù×÷µÄ½á¹û¶¼¿ÉÒÔ´Ó
NULL
µÄ¸ÅÄîÍƵ¼³öÀ´¡£
ÅжÏÒ»¸ö×Ö¶ÎÊÇ·ñΪ
NULL
......

SQLÓÅ»¯

(Ò»)ÉîÈëdz³öÀí½âË÷Òý½á¹¹
¡¡¡¡Êµ¼ÊÉÏ£¬Äú¿ÉÒÔ°ÑË÷ÒýÀí½âΪһÖÖÌØÊâµÄĿ¼¡£Î¢ÈíµÄSQL SERVERÌṩÁËÁ½ÖÖË÷Òý£º¾Û¼¯Ë÷Òý(clustered index£¬Ò²³Æ¾ÛÀàË÷Òý¡¢´Ø¼¯Ë÷Òý)ºÍ·Ç¾Û¼¯Ë÷Òý(nonclustered index£¬Ò²³Æ·Ç¾ÛÀàË÷Òý¡¢·Ç´Ø¼¯Ë÷Òý)¡£ÏÂÃ棬ÎÒÃǾÙÀýÀ´ËµÃ÷һϾۼ¯Ë÷ÒýºÍ·Ç¾Û¼¯Ë÷ÒýµÄÇø±ð£º
¡¡¡¡Æäʵ£¬ÎÒÃǵĺºÓï×ÖµäµÄÕýÎı ......

ORACLE PL/SQL ¼¯ºÏѧϰ±Ê¼Ç(¶þ)

Èý¡¢Ç¶Ì×±íµÄʹÓ÷½·¨
 
1¡¢½«Ç¶Ì×±í¶¨ÒåΪPL/SQLµÄ³ÌÐò¹¹Ôì¿é
 
TYPE type_name IS TABLE OF element_type[NOT NULL];
 
ÈçÏÂÀýËùʾ£º
DECLARE

-- Define a nested table of variable length strings.
TYPE card_table IS TABLE OF VARCHAR2(5 CHAR);

-- Declare and initialize a n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ