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

´ÓSQLÊý¾Ý¿âÀïËæ»ú¶ÁÈ¡Ò»Ìõ¼Ç¼



ÔõÑù´ÓÊý¾Ý¿âÀïËæ»ú¶ÁÈ¡
Ò»Ìõ¼Ç¼£¬
SELECT TOP 1 * from dbo.Customers ORDER BY  NEWID()
ÕâÑù£¬Èç¹ûÊÇËæ»ú10
Ìõ£¬100Ìõ¡£¡£¡£¡£
SELECT TOP 10 * from dbo.Customers ORDER BY  NEWID()
ºÜ¼òµ¥°É¡£
²»¹ýtopºóÃæÊý×ÖÔ½´ó£¬ÔËÐÐËÙ¶ÈÔ½Âý¡£²»ÍƼöÊý¾Ý×ÖÌ«´ó¡£
ÒÔºó´úÂëÔÚSQL20005ÖвâÊÔͨ¹ý£¬ACCESSºÃÏñ²»ÐС£


Ïà¹ØÎĵµ£º

SQL SERVER 2008µÄÒ»µã¹¤×÷×ܽá

×î½üÒ»Ö±ÔÚÓÃSQL SERVER, ·¢ÏÖƽʱ»ýÔܵÄһЩÎÊÌâÈç¹û²»¼°Ê±µÄ¼Ç¼ÏÂÀ´,ºÜ¿ì¾ÍÍüÁË. ¹ý¶Îʱ¼äÔÙ·¢ÏÖÏàͬÎÊÌâʱ,»¹Òª×öÖظ´¹¤×÷.
¶à×öЩ±Ê¼Ç°É, Ìá¸ßһϹ¤×÷ЧÂÊ.
1, ¶ÁÈ¡DBFÎļþ£¬´æÈëµ½SQL SERVERʱ£¬³öÏÖÎÊÌâÁ½¸ö¡£
µÚÒ»¸ö´íÎóÐÅÏ¢£º“·¢Éú´íÎó£ºERROR [IM001][Microsoft][ODBCÇý¶¯³ÌÐò¹ÜÀíÆ÷]Çý¶¯³ÌÐò²»Ö§³Ö´Ë ......

oracle³£ÓÃsqlÓï¾ä

ÐÞ¸ÄÁÐÊôÐÔ
alter table tablename modify(name ,varchar2(10)) Áпí¶È²»µÃСÓÚÐÞ¸ÄÇ°µÄ¿í¶È
ÈÕÖ¾¹ÜÀí
ÊÓͼ v$logfile
alter database add logfile 'd:\orcl01.log' size 10m;//Ìí¼Ó×é
alter database add logfile member 'd:\orcl02.log' to group 4;//Ïò4×éÖÐÌí¼Ó³ÉÔ±
alter database drop logfile member 'd: ......

sql ¿ç·þÎñÆ÷ ²éѯ

--´´½¨Á´½Ó·þÎñÆ÷
exec sp_addlinkedserver   'ITSV ', ' ', 'SQLOLEDB ', 'Ô¶³Ì·þÎñÆ÷Ãû»òipµØÖ· '
exec sp_addlinkedsrvlogin 'ITSV ', 'false ',null, 'Óû§Ãû ', 'ÃÜÂë '
--²éѯʾÀý
select * from ITSV.Êý¾Ý¿âÃû.dbo.±íÃû
--µ¼ÈëʾÀý
select * into ±í from ITSV.Êý¾Ý¿âÃû.dbo.±íÃû
--ÒÔºó²»Ô ......

OracleÈçºÎÖ´ÐÐÅúÁ¿sqlÓï¾ä

Òª´´½¨Á½¸öÎļþ
1: runBatch.bat
2: sql.txt
runBatch.bat ÄÚÈÝÈçÏ£º
sqlplus username/password @sql.txt
pause
sql.txtÄÚÈÝÈçÏ£º
spool sql.log
create table t1(cname char(20));
insert into t1(cname) values('test');
select * from t1;
spool off
exit
Ë«»÷runBatch.bat¾Í¿ÉÒÔÅúÁ¿Ö´ÐÐsql.txtÖÐ ......

SQL Server Êý¾Ý¸ñʽÐÞ¸Äʱ£¬Ã»Óб£´æ°´Å¥µÄÇé¿ö½â¾ö

Èç¹ûÄãʹÓõÄÊÇ SQL Server 2008£¬ µ±ÄãÐÞ¸ÄÊý¾Ý½á¹¹ºó£¬±£´æʱ»á±¨ÏÂͼÇé¿ö£º Saving changes is not permitted. The changes you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving cha ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ