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

¶¯Ì¬´´½¨Sql ServerÊý¾Ý¿âÏà¹Ø£¨È«£©

 
CREATE DATABASE
´´½¨Ò»¸öÐÂÊý¾Ý¿â¼°´æ´¢¸ÃÊý¾Ý¿âµÄÎļþ£¬»ò´ÓÏÈÇ°´´½¨µÄÊý¾Ý¿âµÄÎļþÖи½¼ÓÊý¾Ý¿â¡£
˵Ã÷ ÓйØÓë DISK INIT Ïòºó¼æÈÝÐԵĸü¶àÐÅÏ¢£¬Çë²Î¼û"Microsoft® SQL Server™ Ïòºó¼æÈÝÐÔÏêϸÐÅÏ¢"ÖеÄÉ豸£¨¼¶±ð 3£©¡£
Óï·¨
CREATE DATABASE database_name
[ ON
[ < filespec > [ ,...n ] ]
[ , < filegroup > [ ,...n ] ]
]
[ LOG ON { < filespec > [ ,...n ] } ]
[ COLLATE collation_name ]
[ FOR LOAD | FOR ATTACH ]
< filespec > ::=
[ PRIMARY ]
( [ NAME = logical_file_name , ]
FILENAME = 'os_file_name'
[ , SIZE = size ]
[ , MAXSIZE = { max_size | UNLIMITED } ]
[ , FILEGROWTH = growth_increment ] ) [ ,...n ]
< filegroup > ::=
FILEGROUP filegroup_name < filespec > [ ,...n ]
²ÎÊý
database_name
ÐÂÊý¾Ý¿âµÄÃû³Æ¡£Êý¾Ý¿âÃû³ÆÔÚ·þÎñÆ÷ÖбØÐëΨһ£¬²¢ÇÒ·ûºÏ±êʶ·ûµÄ¹æÔò¡£database_name ×î¶à¿ÉÒÔ°üº¬ 128 ¸ö×Ö·û£¬³ý·ÇûÓÐΪÈÕÖ¾Ö¸¶¨Âß¼­Ãû¡£Èç¹ûûÓÐÖ¸¶¨ÈÕÖ¾ÎļþµÄÂß¼­Ãû£¬Ôò Microsoft® SQL Server™ »áͨ¹ýÏò database_name ×·¼Óºó׺À´Éú³ÉÂß¼­Ãû¡£¸Ã²Ù×÷ÒªÇó database_name ÔÚ 123 ¸ö×Ö·ûÖ®ÄÚ£¬ÒÔ±ãÉú³ÉµÄÈÕÖ¾ÎļþÂß¼­ÃûÉÙÓÚ 128 ¸ö×Ö·û¡£
ON
Ö¸¶¨ÏÔʽ¶¨ÒåÓÃÀ´´æ´¢Êý¾Ý¿âÊý¾Ý²¿·ÖµÄ´ÅÅÌÎļþ£¨Êý¾ÝÎļþ£©¡£¸Ã¹Ø¼ü×Öºó¸úÒÔ¶ººÅ·Ö¸ôµÄ <filespec> ÏîÁÐ±í£¬<filespec> ÏîÓÃÒÔ¶¨ÒåÖ÷Îļþ×éµÄÊý¾ÝÎļþ¡£Ö÷Îļþ×éµÄÎļþÁбíºó¿É¸úÒÔ¶ººÅ·Ö¸ôµÄ <filegroup> ÏîÁÐ±í£¨¿ÉÑ¡£©£¬<filegroup> ÏîÓÃÒÔ¶¨ÒåÓû§Îļþ×é¼°ÆäÎļþ¡£
n
ռλ·û£¬±íʾ¿ÉÒÔΪÐÂÊý¾Ý¿âÖ¸¶¨¶à¸öÎļþ¡£
LOG ON
Ö¸¶¨ÏÔʽ¶¨ÒåÓÃÀ´´æ´¢Êý¾Ý¿âÈÕÖ¾µÄ´ÅÅÌÎļþ£¨ÈÕÖ¾Îļþ£©¡£¸Ã¹Ø¼ü×Öºó¸úÒÔ¶ººÅ·Ö¸ôµÄ <filespec> ÏîÁÐ±í£¬<filespec> ÏîÓÃÒÔ¶¨ÒåÈÕÖ¾Îļþ¡£Èç¹ûûÓÐÖ¸¶¨ LOG ON£¬½«×Ô¶¯´´½¨Ò»¸öÈÕÖ¾Îļþ£¬¸ÃÎļþʹÓÃϵͳÉú³ÉµÄÃû³Æ£¬´óСΪÊý¾Ý¿âÖÐËùÓÐÊý¾ÝÎļþ×Ü´óСµÄ 25%¡£
FOR LOAD
Ö§³Ö¸Ã×Ó¾äÊÇΪÁËÓëÔçÆÚ°æ±¾µÄ Microsoft SQL Server ¼æÈÝ¡£Êý¾Ý¿âÔÚ´ò¿ª dbo use only Êý¾Ý¿âÑ¡ÏîµÄÇé¿öÏ´´½¨£¬²¢ÇÒ½«Æä״̬ÉèÖÃΪÕýÔÚ×°ÔØ¡£SQL Server 7.0 °æÖв»ÐèÒª¸Ã×Ӿ䣬ÒòΪ RESTORE Óï¾ä¿ÉÒÔ×÷Ϊ»¹Ô­²Ù×÷µÄÒ»²¿·ÖÖØд´½¨Êý¾Ý¿â¡£
FOR ATTACH
Ö¸¶¨´ÓÏÖÓеÄÒ»×é²Ù×÷ϵͳÎļþÖи½¼ÓÊý¾Ý¿â¡£±ØÐ


Ïà¹ØÎĵµ£º

SQL²éѯÓï¾ä¾«»ª

 Ò»¡¢ ¼òµ¥²éѯ
¼òµ¥µÄTransact-SQL²éѯֻ°üÀ¨Ñ¡ÔñÁÐ±í¡¢from×Ó¾äºÍWHERE×Ӿ䡣ËüÃÇ·Ö±ð˵Ã÷Ëù²éѯÁС¢²éѯµÄ
±í»òÊÓͼ¡¢ÒÔ¼°ËÑË÷Ìõ¼þµÈ¡£
ÀýÈ磬ÏÂÃæµÄÓï¾ä²éѯtesttable±íÖÐÐÕÃûΪ“ÕÅÈý”µÄnickname×ֶκÍemail×ֶΡ£
SELECT nickname,email
from testtable
WHERE name='ÕÅÈý'
(Ò») Ñ¡ÔñÁÐ ......

Oracle³£ÓÃSQLÓï¾ä(PL/SQL developer¹¤¾ßϵÄ)

 ½¨±í
create table users(
id number(4) primary key,
username varchar2(10),
password varchar2(10)
)
²éѯ±í²¢½âËø±í(¼´¿ÉÒÔµã»÷ÊäÈë¿òÏÂÃæµÄ"Ëø"ͼ±ê¹¤¾ß, ¼´"Edit data")
select * from users for update
ɾ³ý±íÖжàÓàµÄÁÐ
alter table mobilephone drop column mobiletype
תÔØ
------------------- ......

ORACLE PL/SQL ¼¯ºÏѧϰ±Ê¼Ç(Èý)

ËÄ¡¢ÁªºÏÊý×éµÄʹÓ÷½·¨
ÁªºÏÊý×éÒÔÇ°±»³ÆΪPL/SQL±í¡£ÔÚ±íÖв»ÄÜʹÓÃÁªºÏÊý×飬ֻÄܽ«ËüÃÇÓÃ×÷³ÌÐòÉè¼ÆµÄ½á¹¹Ìå¡£Ö»ÄÜÔÚPL/SQLÖзÃÎÊÁªºÏÊý×é¡£
×¢Òâµ½ÁªºÏÊý×é´øÀ´µÄһЩ¹Ø¼üÎÊÌâÊǷdz£ÖØÒªµÄ¡£ÕâЩÎÊÌâʹÎÒÃǽéÉÜËüÃǵÄÓ÷¨Ê±£¬ÐèÒª²ÉȡһЩÌرðµÄ·½·¨¡£ÕâЩÎÊÌâ°üÀ¨£º
ÁªºÏÊý×é²»ÐèÒª³õʼ»¯£¬Ò²Ã»Óй¹Ô캯ÊýÓï·¨¡£ÔÚ ......

²Ù×÷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-spa ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ