상용 ql 집합 기록 정리

5342 단어
select 'truncate table ' + Name + ';' from sysobjects where xtype='U' order by name asc; --            ,     truncate table   

 
insert into ynculture.dbo.PLUGINS_DISTRICT(ID, CODE, TITLE,EN_TITLE,CITY_CODE,PARENT_ID,CLASS_LAYER,CLASS_LIST,IMG_URL,PINYIN,SORT,IS_DELETE,ADD_TIME,UPDATE_TIME) select ID, CITY_ID, TITLE,EN_TITLE,CODE,PARENT_ID,CLASS_LAYER,CLASS_LIST,IMG_URL,CITY_PINYIN,SORT,IS_DELETE,GETDATE(),GETDATE() from hyxs.dbo.PLUGINS_DISTRICT; --   2   2        1   1  

 
insert into dashihui.dbo.PLUGINS_DISTRICT(ID, TITLE,EN_TITLE,CITY_TYPE,CITY_CODE,TEL_CODE,PARENT_CODE,PARENT_ID,ROOT_ID,CLASS_LAYER,CLASS_LIST,IMG_URL,PINYIN,SORT,IS_DELETE,ADD_TIME,UPDATE_TIME,CENTER_LON,CENTER_LAT) select ID, TITLE,EN_TITLE,CITY_TYPE,CITY_CODE,TEL_CODE,PARENT_CODE,PARENT_ID,ROOT_ID,CLASS_LAYER,CLASS_LIST,IMG_URL,PINYIN,SORT,IS_DELETE,GETDATE(),GETDATE(),CENTER_LON,CENTER_LAT from meigongheTravel.dbo.PLUGINS_DISTRICT; 

 
 
select * from USERS where USER_NAME in (select USER_NAME from USERS where IS_DELETE=0 group by USER_NAME having COUNT(*)>1) --             

 
update dbo.PRODUCT_IMG_LIST set PATH = replace(PATH,'http://www.baidu.com','');  --          

 
SELECT * FROM [Master].[dbo].[SYSPROCESSES] WHERE [DBID] IN ( SELECT [DBID] FROM [Master].[dbo].[SYSDATABASES] WHERE   NAME='   ')

좋은 웹페이지 즐겨찾기