写一个sql中视图和存储过程的简单创建和调用方法!!!自我备忘用····

it2022-05-05  108

刚才想写个存储过程,想不起语法了。在网上查了查找到了!!

写完了又忘了怎么调用了 !晕死!···

赶快写个简单备忘·······················

select * from loginselect * from userinfoselect max(id) from loginselect * from login a,userinfo b where a.id=b.id

--创建视图create view  LogAndUseras  select a.id,a.uname,a.upwd,a.lasttime,b.turename,b.age from login a,userinfo b where a.id=b.id

--修改视图alter view LogAndUseras  select a.id,a.uname,a.upwd,a.lasttime,b.turename,b.age  from login a left join userinfo b on a.id=b.id

--测试视图select * from LogAndUser

--创建存储过程alter proc TestProc (@id int)as( select * from login where id=@id)

--测试存储过程exec TestProc 3 

转载于:https://www.cnblogs.com/xxj-jing/archive/2007/10/18/2890133.html

相关资源:各显卡算力对照表!

最新回复(0)