SqlServerÃüÃû¹æ·¶
ÃüÃû¹ý³ÌÖÐÈçÓÐÏÖ´æµÄËõд£¬ÔòʹÓøÃËõд£¬ÈçÎÞ£¬Ò»Âɲ»µÃËõд£¬Àý£ºISBN
Êý¾Ý¿â£ºÓÃÒ»¸ö»òÈý¸öÒÔÏÂÓ¢Îĵ¥´Ê×é³É£¬µ¥´ÊÊ××Öĸ´óд£¬È磺DepartmentManage£»
±íÃû£ºÊ¹ÓÃÃû´ÊÐÔÖʵĵ¥´ÊÈ«Æ´±íʾ£¬¸÷µ¥´ÊÊ××Öĸ´óд£¬ ʹÓø´ÊýÐÎʽ£¬È磺Books
Èç¹û¸Ã±íÓÃÓÚ±íÃ÷ÁíÍâÁ½±íÖÐ×ֶμäµÄ¹Øϵ£¬Óõ¥Êý(¼´±íÃ÷ʵÌå¼äµÄ¹ØϵµÄ±íÓõ¥ÊýÃüÃû),µ¥´ÊÖмäÎÞ“and of in”Ö®ÀàµÄ½é´Ê
È磺BookAuthor
1. ±íÖеÄ×Ö¶ÎÒ»°ãʹÓÃÃû´ÊÐÔÖʵĵ¥´ÊÈ«Æ´±íʾ£¬²ÉÓÃÒ»¸ö»òÈý¸öÒÔÏÂÓ¢Îĵ¥´Ê×é³É£¬µ¥´ÊÊ××Öĸ´óд£¬È磺UserName;
2. ±íÖ÷¼üÃû³ÆΪ£º±íÃû+ID£¬ÈçDocument±íµÄÖ÷¼üÃûΪ£ºDocumentID
3. Íâ¼üÃû³Æλ£ºÖ÷±íÃû+¶ÔÓ¦ÁÐÃû£¬È磺DepartmentsID£¬ËµÃ÷ÈçÏ£º
ÔÚ±íDepartmentsÖУ¬Æä×Ö¶ÎÓУºID, DepartmentName
ÔÚ±íUserInfoÖУ¬Æä×Ö¶ÎÓУºUserId,UserName,DepartmentsID DepartmentsIDΪÍâ¼ü
4. ±íÖÐ×Ô¶¯Ôö³¤µÄÁÐÒ»ÂÉÃüÃûΪ£ºID£»
5. Èç¹û×Ö¶ÎΪboolÐÍ£¬ÔòʹÓÃ"IsShow","IsValid","HasPassed","HasExamined","IgnoreCase"ÕâÖÖÐÎʽ±íʾ
6. Èç¹û×Ö¶ÎλDateTimeÐÍ£¬ÇÐÇÒĬÈÏÖµÊÇȡϵͳʱ¼ä£¬Ò»ÂÉÃüÃûλ£ºCheckDate
7. StatusΪ±íÖÐ״̬µÄÁÐÃû£¬Ä¬ÈÏֵΪ0£¬ÔÚ±íÖÐɾ³ý²Ù×÷½«»á¸Ä±äStatusµÄÖµ¶ø²»Õæʵɾ³ý¸Ã¼Ç¼£»
8. ´æ´¢¹ý³ÌÃüÃû£ºsp_±íÃû_·½·¨,È磺sp_News_Add,sp_News_Update;
9. ÊÓͼÃüÃû£ºvi_±íÃû£¬È磺vi_News;
10. ±í¡¢´æ´¢¹ý³Ì¡¢ÊÓͼµÈ¶ÔÏóµÄËùÓж¼Îªdbo£¬²»ÒªÊ¹ÓÃÊý¾Ý¿âÓû§Ãû£¬ÕâÑù»áÓ°ÏìÊý¾Ý¿âÓû§µÄ¸ü¸Ä
Ïà¹ØÎĵµ£º
/******************************
ϵͳº¯Êý
******************************/
--convert ÓÃÀ´×ª±äÊý¾ÝÀàÐÍ
--convert (data_type[(length)], expression [, style])
select convert(int,convert(varchar(5),12345)+'678')+1 --·µ»Ø12345679
--cast Ò²ÊÇÓÃÀ´×ª»»Êý¾ÝÀàÐÍ
--cast(expression as data_type[(l ......
Ë÷ÒýµÄÖØÒªÐÔ
Êý¾Ý¿âÐÔÄÜÓÅ»¯ÖÐË÷Òý¾ø¶ÔÊÇÒ»¸öÖØÁ¿¼¶µÄÒòËØ£¬¿ÉÒÔ˵£¬Ë÷ÒýʹÓò»µ±£¬ÆäËüÓÅ»¯´ëÊ©½«ºÁÎÞÒâÒå¡£
¾Û´ØË÷Òý
(Clustered Index)ºÍ·Ç¾Û´ØË÷Òý
(Non- Clustered Index)
×îͨË׵ĽâÊÍÊÇ:¾Û´ØË÷ÒýµÄ˳Ðò¾ÍÊÇÊý¾ÝµÄÎïÀí´æ´¢Ë³Ðò£¬¶ø¶Ô·Ç¾Û´ØË÷ÒýµÄË÷Òý˳ÐòÓëÊý¾ÝÎïÀíÅÅÁÐ˳ÐòÎ޹ء£¾ÙÀýÀ´Ëµ£¬Äã·µ½Ð»ª×ÖµäµÄº ......
//×ܼǼÊý
function sumRecord()
{
var conn= Server.CreateObject("ADODB.connection");
var rs= Server.CreateObject("adodb.recordset");
conn.open("PROVIDER=SQLOLEDB;DATA SOURCE=127.0.0.1;UID=sa;PWD=123456;DATABASE=test");
var sql = "select count(*) as RecordCount from baoming";
rs.open(sql, ......
Ç°ÕóÓöµ½ ±¾µØsqlserver2005¿ç¿â²éѯ
½á¹ûÊ×Ïȱ¨´íµÄÊÇ ÎÞ·¨ ´¦Àí²»Í¬µÄÅÅÐò¹æÔò
ÔÚÐÞ¸ÄÅÅÐò¹æÔòµÄ¹ý³ÌÖУ¬ÓÖ³öÏÖÁË£¬“ÎÞ·¨ÓÃÅÅËûËøËø¶¨¸ÃÊý¾Ý¿â£¬ÒÔÖ´ÐиòÙ×÷¡£”ÕâÑùµÄ´íÎó¡£
¾²é×ÊÁÏ·¢ÏÖ£¬ÐÞ¸ÄÊý¾Ý¿âΪµ¥Óû§·ÃÎÊ£¬¿ÉÒÔËø¶¨Êý¾Ý¿â¡£
alter database yourdatabase set single_user with rollback ......