Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE View vw_user_profile
- AS
- Select A.user_id, B.profile_description
- FROM tbl_user A left join tbl_profile B on A.user_id = b.user_id
- GO
- SELECT profile_description FROM vw_user_profile WHERE user_id = @ID
- create procedure dbo.getDesc
- @ID int
- AS
- begin
- SELECT profile_description FROM vw_user_profile WHERE user_id = @ID
- END
- GO
- dbo.getDesc 25
- CREATE View vw_user_profile AS
- Select A.user_id, B.profile_description
- FROM tbl_user A left join tbl_profile B on A.user_id = b.user_id
- Update vw_user_profile Set profile_description='Manager' where user_id=4
- Update tbl_profile Set profile_description='Manager' where user_id=4
- Create View Junk as SELECT * from [TableName]
- Insert into junk (Code,name) values
- ('glyn','Glyn Roberts'),
- ('Mary','Maryann Roberts')
- DELETE from Junk Where ID>4
Add Comment
Please, Sign In to add comment