Created
March 1, 2016 03:40
-
-
Save radityopw/9496cbcea61fd8236df3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use tempdb | |
go | |
-- membuat table dan stored procedure | |
create table radityo_coba1(kunci varchar(255),value text); | |
GO | |
CREATE PROCEDURE dbo.usp_mencoba1 | |
as | |
begin | |
declare @jml_person int | |
select @jml_person = count(*) from AdventureWorks2012.Person.Person | |
insert into radityo_coba1(kunci,value) values ('jumlah person',cast(@jml_person as varchar)) | |
end | |
go | |
-- menjalankan stored procedure dan melihat hasilnya | |
exec usp_mencoba1 | |
select * from radityo_coba1 | |
-- menghapus | |
drop table radityo_coba1 | |
DROP PROCEDURE [dbo].[usp_mencoba1 ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment