SQL server 2000 ÈçºÎÅжÏÁÙʱ±íÊÇ·ñ´æÔÚ
1.ÅжÏÒ»¸öÁÙʱ±íÊÇ·ñ´æÔÚ
if exists (select * from tempdb.dbo.sysobjects where id = object_id(N'tempdb..#tempcitys') and type='U')
drop table #tempcitys
×¢ÒâtempdbºóÃæÊÇÁ½¸ö. ²»ÊÇÒ»¸öµÄ
---ÁÙʱ±í
if exists(select * from tempdb..sysobjects where name like ‘#tmp1%‘)
drop table #tmp1
»ò
if exists( select * from tempdb..sysobjects where id=OBJECT_ID('tempdb..#tmp') )
drop table #tmp1
--ÊÓͼ
if exists (select * from sysobjects where id = object_id(N‘[dbo].[ESTMP]‘)
and OBJECTPROPERTY(id, N‘IsView‘) = 1)
drop view ESTMP
ÅжϱíÊÇ·ñ´æÔÚ
if exists (select * from sysobjects where id = object_id(N'[dbo].[phone]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[phone]
Ïà¹ØÎĵµ£º
·ÀSQL×¢È뺯Êý
³ÌÐò´úÂ룺
º¯Êý²¿·Ö========================================================================
'------------------------------------------------
'ÓÃ;:¼ì²éÊÇ·ñΪÊý×Ö,ÒÔ¼°Êý×ÖÊÇ·ñ³¬³ö·¶Î§
'ÊäÈë:¼ì²é×Ö·û,´«Öµ·½Ê½(0Ö±½Ó´«,1È¡Form,2È¡QueryString,3È¡cookies,4Ö±½ÓReqeust),¿ªÊ¼Êý×Ö(ĬÈÏÊý× ......
£±.½¨Ò»ÕÅ±í¡¡´æ·ÅÊý¾Ý¡¡ÔÚÏÂÃæ£Ó£Ñ£Ìº¯ÊýÖÐÓÐÓõ½
create table solardata
(
yearid int not null,
data char(7) not null, ......
/*»ñÈ¡ÖØ¸´¼Ç¼ÖнÏСµÄÄǸöID*/ create table tmp_Repeat as select min(id) as id from poi group by idcode having count(*) >1; /*±¸·Ýɾ³ýµÄÊý¾Ý*/ select * from poi where id in (select id from tmp_repeat) /*ɾ³ýÖØ¸´¼Ç¼ÖÐID½ÏСµÄÄÇÌõ
select replace('°¢¹ðÊǸöºÃº¢×Ó','°¢¹ð','СÏÍ') from du ......
sp_configure 'allow updates', 1
GO
reconfigure with override
GO
update syscolumns set colstat = colstat & 0x0000
where id=object_id('±íÃû') and name='ÁÐÃû'
GO
sp_configure 'allow updates', 0 ......
select c0501 "¶©µ¥±àºÅ",
c0503 "¹©Ó¦É̱àÂë",a0302 "¹©Ó¦ÉÌÃû³Æ",
to_char(c0515,'yyyy.mm.dd') "¶©»õÈÕÆÚ",
to_char(c0516,'yyyy.mm.dd') "Ô¤¶¨½»»õÈÕÆÚ"
from c05,a03 where c0503=a0301 and
&nb ......