sql Óï¾äµ¼Èëµ¼³ö´óÈ«
/******* µ¼³öµ½excel
EXEC master..xp_cmdshell ’bcp SettleDB.dbo.shanghu out c:temp1.xls -c -q -S"GNETDATA/GNETDATA" -U"sa" -P""’
/*********** µ¼ÈëExcel
SELECT *
from OpenDataSource( ’Microsoft.Jet.OLEDB.4.0’,
’Data Source="c:test.xls";User ID=Admin;Password=;Extended properties=Excel 5.0’)...xactions
SELECT cast(cast(¿ÆÄ¿±àºÅ as numeric(10,2)) as nvarchar(255))+’¡¡’ ת»»ºóµÄ±ðÃû
from OpenDataSource( ’Microsoft.Jet.OLEDB.4.0’,
’Data Source="c:test.xls";User ID=Admin;Password=;Extended properties=Excel 5.0’)...xactions
/** µ¼ÈëÎı¾Îļþ
EXEC master..xp_cmdshell ’bcp "dbname..tablename" in c:DT.txt -c -Sservername -Usa -Ppassword’
/** µ¼³öÎı¾Îļþ
EXEC master..xp_cmdshell ’bcp "dbname..tablename" out c:DT.txt -c -Sservername -Usa -Ppassword’
»ò
EXEC master..xp_cmdshell ’bcp "Select * from dbname..tablename" queryout c:DT.txt -c -Sservername -Usa -Ppassword’
µ¼³öµ½TXTÎı¾£¬ÓöººÅ·Ö¿ª
exec master..xp_cmdshell ’bcp "¿âÃû..±íÃû" out "d:tt.txt" -c -t ,-U sa -P password’
BULK INSERT ¿âÃû..±íÃû
from ’c:test.txt’
WITH (
FIELDTERMINATOR = ’;’,
ROWTERMINATOR = ’n’
)
--/* dBase IVÎļþ
select * from
OPENROWSET(’MICROSOFT.JET.OLEDB.4.0’
,’dBase IV;HDR=NO;IMEX=2;DATABASE=C:’,’select * from [¿Í»§×ÊÁÏ4.dbf]’)
--*/
--/* dBase IIIÎļþ
select * from
OPENROWSET(’MICROSOFT.JET.OLEDB.4.0’
,’dBase III;HDR=NO;IMEX=2;DATABASE=C:’,’select * from [¿Í»§×ÊÁÏ3.dbf]’)
--*/
--/* FoxPro Êý¾Ý¿â
select * from openrowset(’MSDASQL’,
’Driver=Microsoft Visual FoxPro Driver;SourceType=DBF;SourceDB=c:’,
’select * from [aa.DBF]’)
--*/
/**************µ¼ÈëDBFÎļþ****************/
select * from openrowset(’MSDASQL’,
’Driver=Microsoft Visual FoxPro Driver;
S
Ïà¹ØÎĵµ£º
QL·ÖÀࣺ
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¡¢ ......
ת×Ô£ºhttp://topic.csdn.net/u/20100109/09/70f82fb7-eabc-4140-9573-5f8395e0f62e.html
²éѯËÙ¶ÈÂýµÄÔÒòºÜ¶à£¬³£¼ûÈçϼ¸ÖÖ£º
¡¡¡¡1¡¢Ã»ÓÐË÷Òý»òÕßûÓÐÓõ½Ë÷Òý(ÕâÊDzéѯÂý×î³£¼ûµÄÎÊÌ⣬ÊdzÌÐòÉè¼ÆµÄȱÏÝ)
¡¡¡¡2¡¢I/OÍÌÍÂÁ¿Ð¡£¬ÐγÉÁËÆ¿¾±Ð§Ó¦¡£
¡¡¡¡3¡¢Ã»Óд´½¨¼ÆËãÁе¼Ö²éѯ²»ÓÅ»¯¡£
¡¡¡¡4¡¢ÄÚ´æ²»×ã
¡¡¡ ......
¼òµ¥µØ˵£¬¾ÍÊÇ´ÓCDMÉú³ÉPDMµÄʱºò£¬releationshipÔ¼ÊøÎÞЧ£¬²»ÄÜÉú³ÉÍâ¼üÔ¼ÊøµÄ´úÂë¡£Éú³É»ùÓÚoracleµÄpdmûÎÊÌ⣬ms sql serverÓÐÎÊÌâ
ÕâÀïµÄÊÇsql server 2005
Power DesignerÊÇ15.0.0.2613
¿´Æð來ÊÇPDµÄbug,½â決辦·¨ÊÇÔÚPDM畫ÃæÖÐ點選Model->References...
會Ìø³öÒ ......
½ñÌìÔÚ´¦ÀíÒ»¸öÓû§ÃûÊý¾Ý¿âʱ£¬·¢ÏÖÓÐЩ²»Õý³£µÄÊý¾Ý´æÔÚ£¬°´ÕÕÂß¼£¬Óû§ÃûÖ»ÄÜÊÇÊý×Ö£¬×Öĸ£¬Ï»®Ïߺʹ¿ÖÐÎÄÕâÑùµÄ×Ö·û×éºÏ´æÔÚ£¬²»Ó¦¸ÃÓÐÆäËû×éºÏ´æÔÚ£¬µ«ÊÇ·¢ÏÖÊý¾Ý¿âÖÐÓÉÓÚ¸÷ÖÖÀúÊ·ÔÒò£¬ÓÐЩ²»Õý³£µÄ´æÔÚ£¬ÈçºÎÕÒµ½ÕâЩÒì³£Êý¾Ý£¬ÔÚCSDNµÄ SQL Server °æÎÊÁËÕâÑùÁ½¸öÎÊÌ⣬ÈçÏ£º http://topic.csdn.net/u/20100111 ......
oracle³£ÓþµäSQL²éѯ
³£ÓÃSQL²éѯ£º
1¡¢²é¿´±í¿Õ¼äµÄÃû³Æ¼°´óС
select t.tablespace_name, round(sum(bytes/(1024*1024)),0) ts_size
from dba_tablespaces t, dba_data_files d
where t.tablespace_name = d.tablespace_name
group by t.tablespace_name;
2¡¢²é¿´±í¿Õ¼äÎïÀíÎļþµÄÃû³Æ ......