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

SQL²Ù×÷È«¼¯

ÏÂÁÐÓï¾ä²¿·ÖÊÇMssqlÓï¾ä£¬²»¿ÉÒÔÔÚaccessÖÐʹÓᣠ  
 
SQL·ÖÀࣺ   
DDL—Êý¾Ý¶¨ÒåÓïÑÔ(CREATE£¬ALTER£¬DROP£¬DECLARE)   
DML—Êý¾Ý²Ù×ÝÓïÑÔ(SELECT£¬DELETE£¬UPDATE£¬INSERT)   
DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£¬ROLLBACK)   
 
Ê×ÏÈ,¼òÒª½éÉÜ»ù´¡Óï¾ä£º   
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¡¢ËµÃ÷£º´´½¨ÐÂ±í   
create table tabname(col1 type1 [not null] [primary key],col2 type2 [not null],..)   
¸ù¾ÝÒÑÓÐµÄ±í´´½¨ÐÂ±í£º   
A£ºcreate table tab_new like tab_old (ʹÓÃ¾É±í´´½¨Ð±í)   
B£ºcreate table tab_new as select col1,col2… from tab_old definition only   
5¡¢ËµÃ÷£ºÉ¾³ýбídrop table tabname   
6¡¢ËµÃ÷£ºÔö¼ÓÒ»¸öÁР  
Alter table tabname add column col type   
×¢£ºÁÐÔö¼Óºó½«²»ÄÜɾ³ý¡£DB2ÖÐÁмÓÉϺóÊý¾ÝÀàÐÍÒ²²»Äܸı䣬ΨһÄܸıäµÄÊÇÔö¼ÓvarcharÀàÐ͵ij¤¶È¡£   
7¡¢ËµÃ÷£ºÌí¼ÓÖ÷¼ü£º Alter table tabname add primary key(col)   
˵Ã÷£ºÉ¾³ýÖ÷¼ü£º Alter table tabname drop primary key(col)   
8¡¢ËµÃ÷£º´´½¨Ë÷Òý£ºcreate [unique] index idxname on tabname(col….)   
ɾ³ýË÷Òý£ºdrop index idxname   
×¢£ºË÷ÒýÊDz»¿É¸ü¸ÄµÄ£¬Ïë¸ü¸Ä±ØÐëɾ³ýÖØн¨¡£   
9¡¢ËµÃ÷£º´´½¨ÊÓͼ£ºcreate view viewname as select statement   
ɾ³ýÊÓͼ£ºdrop view viewname   
10¡¢ËµÃ÷£º¼¸¸ö


Ïà¹ØÎĵµ£º

Ôõô´Óoracleͨ¹ýodbc ºÍsqlµÃµ½mysql

 oracleµÄodbcÍø¹Ø£¨gateway£©¼¸ºõÌṩһ¸öÎÞÏßµÄÊý¾ÝÕûºÏƽ̨£¬ÔÚoracleºÍÆäËüRDBMSÖ®¼ä£¬ÎÒÔÚÕâ²»Ïë˵ËüµÄ£¬²Ù×÷£¬ÏÞÖÆÒÔ¼°Ïà¹ØÐÔ£¬Ëü½â¾öÁËÒ»¸öСÎÊÌ⣬°ÑËü½¨Á¢ÆðÀ´ÄãÄÜ£¬ÀýÈ磬´´½¨Ò»¸ö database link ÔÚoracle ºÍoracleÖ®¼ä£¬±Ï¾¹£¬ÕâÑù²»ÊǺܺÃô£¬ÀýÈçÄãÄÜÔËÐÐÏÂÃæµÄsqlÓï¾ä£¬
select o.col1, m.col1 from or ......

SQL ×Ö·û´®½ØȡʾÀý

SELECT LEFT(RTRIM('20080927p1058'),LEN('20080927p1058')-2)
 
SELECT SUBSTRING('20080927p1058',1,LEN('20080927p1058')-2)
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*whit ......

ÈçºÎÁ´½Óµ½Sql Server 2005


SQL Server 2005
±¾Æª½éÉÜÈçºÎÁ´½Óµ½Sql Server 2005.
²ÉÓÃSQL ±¾µØ¿Í»§ ODBCÇý¶¯
²ÉÓÃSqlÉí·ÝÑéÖ¤
Driver={SQL Native Client};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
ÄãÕýÔÚʹÓÃSQL Server 2005 Express£¿±ðÍü¼ÇÁË£¬ServernameµÄÓï·¨ÊÇServername\SQLEXPRESS£¬Äã¿ÉÒÔÓÃÄã°²× ......

jspÓëSQL Server 2000 µÄÁ¬½Ó

ÖÕÓڸ㶨JSPÁ¬½ÓSQL Server 2000Êý¾Ý¿âµÄÎÊÌâÁË
2008Äê01ÔÂ29ÈÕ ÐÇÆÚ¶þ 15:54
    Ç°¼¸Ì죬ƽƽͬѧһֱÔÚ¸ãJSP Á¬½ÓSQL Server 2000Êý¾Ý¿âµÄÎÊÌ⣬һֱÁ¬²»ÉÏ£¬È»ºó½ÐÎÒÈ¥°ïËû¿´¿´£¬Æ¾×ÅÒÔÇ°µÄ¾­Ñ飬¸ãÁËÒ»¸öÏÂÎ磬ºÙºÙ£¡ÖÕÓÚ°ïËûÁ¬½ÓÉÏÁË£¬Ö÷Òª²½ÖèÈçÏ£º
    1¡¢ÐèÒªµÄ¶«Î÷´ó¼Ò¿ÉÒÔµ½Î ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ