How to Use 'Exec Sp_executesql' to Read SQL String with Data Exchange(Interface)
来源:互联网 发布:js怎样仿写shift 编辑:程序博客网 时间:2024/06/06 07:19
if object_id('finaltest') is not null
drop proc finaltest
go
create proc finaltest
@student_number INT output,
@lastfirst varchar(50) output,
@input_grade int
as
declare @sql NVARCHAR(500)
set @sql=N'select @p=student_number,@q=lastfirst from students where grade_level=@i'
exec sp_executesql @sql,N'@p int output,@q varchar(50) output,@i int',
@p=@student_number output ,
@q=@lastfirst output,
@i=@input_grade
select @student_number,@lastfirst,@input_grade,@sql
go
---------------------------------------------below is out side--------------------------------------------------------
declare @student_number_out int,
@lastfirst_out varchar(50)
exec finaltest
@student_number=@student_number_out output,
@lastfirst=@lastfirst_out output,
@input_grade=9
select @student_number_out,@lastfirst_out
go
- How to Use 'Exec Sp_executesql' to Read SQL String with Data Exchange(Interface)
- How to use Interface
- How to use Comparable Interface
- How to use MySql with Linq to SQL
- How to read binary data from HDFS with Thrift?
- How To use Data Referenece ...
- How to use libcurl in C++ with std::string
- how to use String.strip()
- How to Read SQL Syntax
- Use pandas to read data from files
- How To Use SQL XML ?
- How To Use the GitLab User Interface To Manage Projects
- How to use epoll_event data.ptr
- How To Use Linux epoll with Python
- How to use Trace2UML together with Doxygen
- How To Use Linux epoll with Python
- How to use Blocks with iOS
- how to use linux epoll with c
- js对象属性 通过点(.) 和 方括号([]) 的不同之处
- BootStrap学习
- Andrid数据库框架——greenDAO(三)
- 【Unity3D】Android和ios真机调试测Profiler
- avalon html元素绑定基础入门
- How to Use 'Exec Sp_executesql' to Read SQL String with Data Exchange(Interface)
- 利用photoshop生成acv文件
- 自定义下拉刷新
- GDAL环境搭建(JAVA)
- Tomcat 6.0 简介
- 一个jsp页面多次提交form
- Oracle、Db2、SqlServer、MySQL 数据库插入当前系统时间
- IO中那些流之文件复制
- zzulioj-1965-Big Prize【思维】【数学组合】