haitao:
靠!!!刚才一个ESC损失惨痛!!!!!!!!!!
[阅读: 812] 2007-08-30 15:57:31
懒得再写对应的中文了。。。。。。。。。。
http://www.quest.com/2_0/registration.aspx?requestdefid=12492
why ms does not provider "select TOP n SKIP m ... from ... where ... order by ..."?
how get a table'field value if this table has this field,else return -1000
how can i write:
declare @t int
"
if exists(select 1 from syscolumns where id = object_id('myTable') and name='myField')
select @t=max(myField) from myTable --if myTable does not have field names 'myField', this line should be error!
else
set @t=-1000
"
now, i have to write like this " execute sp_executesql N'select @t=max(... "
how can i execute a long string sql?
execute sp_executesql [@stmt =] stmt
stmt must be nvarchar,so it'length only be 1-4000 char. and can not like this: @stmt=@sql1+@sql2+@sql3...
how can i execute a long string sql( whose length more then 10000)?
but execute (@sql1+@sql2+@sql3) is right.