如何使用存储过程在表中添加列

如何使用存储过程在表中添加列

本文介绍了如何使用存储过程在表中添加列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! hi i希望使用存储过程在表格中添加列但是当我尝试收到错误时 Msg 214,Level 16,State 2,过程sp_executesql,第1行 过程需要参数@statement;类型; ntext / nchar / nvarchar; 我尝试过: alter proc SpgetEMP as begin exec sp_executeSQL ' alter table emp add adrs varchar(20)null' 结束 解决方案 hi i want to add column in a table using Stored procedure but when i am trying getting errorMsg 214, Level 16, State 2, Procedure sp_executesql, Line 1Procedure expects parameter @statement; of type ;ntext/nchar/nvarchar;What I have tried:alter proc SpgetEMPasbeginexec sp_executeSQL 'alter table emp add adrs varchar(20) null'end 解决方案 这篇关于如何使用存储过程在表中添加列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-31 13:33