sqlµãµÎ
×Ó±í²éѯ£¬¸¸±íÒ»¶¨Òª¼Ó±ðÃû£¬·ñÔòÊý¾Ý»áÓÐÎÊÌ⣬²»±¨±àÒë´í
select * from table1 a where exist(select 1 from table2 where a.id=b.id)
´æ´¢¹ý³Ì½á¹û¼¯²åÈëµ½ÏÖÓбí
insert into table1 exec procname args
ÁªºÏÒÑÓÐ±í£¬½ô¸úÔÚºóÃæ£¬¶Ô»ã×ܺÜÓÐÓÃ
select a from table1 union all select 'ºÏ¼Æ'
½á¹û¼¯ÀïµÄijÁÐÏà¼Ó
declare @var nvarchar(1000)
set @var=''
select @var=@var+','+alarmname from notice where args=@args
print @var
shellÃüÁî
declare @cmd nvarchar(1000)
set @cmd='bcp "select cellphone,msg from atm.dbo.sendoutmsg" queryout '+@outfile+' -c -q -t "|" -U'+@sqluser+' -P'+@sqlpwd +' -S'+@server
EXEC master..xp_cmdshell @cmd ,NO_OUTPUT
(
@cmd ¿ÉÒÔÊÇ£º
dir c:\ c:\dir_out.txt
del c:\deposit.htm
copy c:\resource\deposit.htm c:\
move c:\µ¹Èë0911.xls d:\µ¹Èë0911.xls
)
´óÈÝÁ¿Êý¾Ýµ¼Èë(ÒÔ\r\nΪÊý¾ÝÐнáβ,|ΪÁзָî·û)
DECLARE @bulk_cmd varchar(1000);
SET @bulk_cmd = 'BULK INSERT dbo.tmpbasedevinfo from ''D:\dev_bmsg.txt''
with (FIELDTERMINATOR =''|'',
ROWTERMINATOR = '''+CHAR(10)+''')';
exec(@bulk_cmd);
ÅжÏÎļþÊÇ·ñ´æÔÚ
create table #tb(a bit,b bit,c bit)
insert into #tb exec master..xp_fileexist 'c:\furniture.txt'
if exists(select * from #tb where a=1)
PRINT Îļþ´æÔÚ
else
PRINT Îļþ²»´æÔÚ
drop table #tb
Ïà¹ØÎĵµ£º
insert into mysql.user
SELECT '%', 'admin', PASSWORD('admin'), Select_priv, Insert_priv, Update_priv,
Delete_priv, Create_priv, Drop_priv, Reload_priv,
Shutdown_priv, Process_priv, File_priv, Grant_priv, References_priv,
Index_priv, Alter_priv, Show_db_priv, Super_priv, ......
ÔÚ¼ÆËã»úÖÐÊý¾ÝÓÐÁ½ÖÖÌØÕ÷£ºÀàÐͺͳ¤¶È¡£ËùνÊý¾ÝÀàÐ;ÍÊÇÒÔÊý¾ÝµÄ±íÏÖ·½Ê½ºÍ´æ´¢·½Ê½À´»®·ÖµÄÊý¾ÝµÄÖÖÀà¡£
ÔÚSQL Server ÖÐÿ¸ö±äÁ¿¡¢²ÎÊý¡¢±í´ïʽµÈ¶¼ÓÐÊý¾ÝÀàÐÍ¡£ÏµÍ³ÌṩµÄÊý¾ÝÀàÐÍ·ÖΪ¼¸´óÀ࣬Èç±í4-2 Ëùʾ¡£
ÆäÖУ¬BIGINT¡¢ SQL_VARIANT ºÍTABLE ÊÇSQL Server 2000 ÖÐÐ ......
SQL Server°²×°Îļþ¹ÒÆð:
ÔÚÖØÐ°²×°Ö÷SQLServer2000ʱ»òÊÇ´ò²¹¶¡Ê±,×ÜÊÇ»áÓöµ½SQLServer°²×°Îļþ¹ÒÆð¡£
ÔÚÔËÐд°¿ÚÊäÈëregedit£¬´ò¿ª×¢²á±í±à¼Æ÷£¬ÔÚHKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session ManagerÖÐÕÒµ½PendingFileRenameOperations£¬É¾³ý¸Ã¼üÖµ£¨Õâ¸ö¼üÖµÊǰ²×°³ÌÐòÔݹÒÏîÄ¿£¬Ö»ÒªÕÒµ½¶ÔÓ¦µÄÓ¦Óó ......
JAVA£×Ö·û´®¹ýÂËÀà
package cn.com.hbivt.util;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2005</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class StringUtils {
/ ......