SQL£²éѯËùÓд¥·¢Æ÷
----²é¿´ËùÓнDZ¾
Create table #y (txt text)
select name, iid = identity(int,1,1) into #x from SysObjects where xtype = 'TR'
declare @i int, @max int
declare @name varchar(40)
set @i = 1
select @max = max(iid) from #x
while @i <= @max
begin
select @name = name from #x where iid = @i
insert #y (txt)
exec('sp_helptext ' + @name)
set @i = @i + 1
end
select * from #y
drop table #x
drop table #y
Ïà¹ØÎĵµ£º
¼ÇÈ¡¼Ç¼¼¯
create procedure getArticle
as
select * from Article_Content
GO
asp.net µ÷Ó÷½·¨
SqlConnection Conn = new SqlConnection();
Conn.ConnectionString = Data.Connstr();
Conn.Open();
......
HO~HO~EXCELÉú³ÉSQL½¨±í´æ´¢¹ý³ÌµÄVBA½Å±¾^_^ÔÞÒ»ÏÂ
2007-12-11 10:39
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ È«¾Ö±äÁ¿¶¨Òå
Const MAX_COLUMN_NUM = 50
Dim stOutputPath As String
Dim stOutputFile As String
Dim stDBName As String
Dim stUserName As String
Dim stUserPasswd As ......
×î½ü£¬ÒòΪÏîÄ¿µÄÔÒò£¬ÐèÒªÉè¼ÆÒ»¸öÊý¾Ý¿â£¬¸ÃÊý¾Ý¿âµÄ¹¦ÄÜÖ÷ÒªÊÇÃèÊöÎļþϵͳµÄ½á¹¹ºÍÎļþÐÅÏ¢£¬ÔÚÍøÉÏÕÒÁ˺ܶàµÄ×ÊÁÏ£¬µ«ÊÇÐí¶àÉè¼ÆÒªÃ´Õë¶Ô²éѯÁ¿±È½Ï¶àµÄÀ´×ö£¬ÒªÃ´Õë¶ÔÐ޸ġ¢²åÈëÁ¿±È½Ï¶àµÄÀ´×ö£¬¶ø¶ÔÓÚÎļþϵͳ¶øÑÔ£¬ËüµÄ²éѯ¡¢²åÈë¡¢Ð޸ͼÊÇÏ൱Ƶ·±µÄ£¬Òò´Ë£¬Êý¾Ý¿âµÄÉè¼Æ¼«ÆäÖØÒª,ÏÖ½«×Ô¼ºµÄÒ»µãÏ뷨˵˵£¬Ï£Íû´ ......
declare @dfname varchar(50)
select @dfname=a.name
from sysobjects a
inner join syscomments b on a.id=b.id
inner join sysconstraints  ......