摘要: v_receipt warehouse_receipt%ROWTYPE;-- 这里创建表类型,v_receipt复刻了warehouse_receipt的类型(相当于拥有了所有相同的字段)select * into v_receipt_detail from warehouse_receipt_detail d where d.receipt_detail_id = v_detailId;**而在MySQL总无法用select into new_table from old_table这个语句**但是MySQL中有temporary table这个临时表如何复刻另一张表呢,语句来了create 阅读全文
posted @ 2013-12-15 18:04 Kstyjobx!! 阅读(3017) 评论(0) 推荐(0) 编辑
摘要: 在声明变量中CREATEfunctionGet_StrArrayLength ( @strvarchar(1024),--要分割的字符串@splitvarchar(10)--分隔符号)returnsint as begindeclare@locationint declare@startint declare@lengthint set@str=ltrim(rtrim(@str)) set@location=charindex(@split,@str) set@length=1 while@location0 begin set@start=@location+1 set@location=c 阅读全文
posted @ 2013-12-15 14:54 Kstyjobx!! 阅读(6238) 评论(0) 推荐(1) 编辑