-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathExemplo.sql
More file actions
27 lines (20 loc) · 788 Bytes
/
Exemplo.sql
File metadata and controls
27 lines (20 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
CREATE TABLE dbo.tbl_TesteConnectionFactory(
colString varchar(100),
colNumeric numeric(10,2),
colDate smalldatetime
)
--INSERT INTO tbl_TesteConnectionFactory (colString, colNumeric, colDate) VALUES ('Teste', 123.45, '2016-03-29')
--exec spc_TesteConnectionFactory 'Teste procedure',12345.67,'2016-03-29'
CREATE PROCEDURE dbo.spc_TesteConnectionFactory(
@colString varchar(100),
@colNumeric numeric(10,2),
@colDate smalldatetime
)
AS
BEGIN
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
SET NOCOUNT ON
INSERT INTO tbl_TesteConnectionFactory (colString, colNumeric, colDate) VALUES (@colString, @colNumeric, @colDate)
END
GRANT INSERT, UPDATE, DELETE ON tbl_TesteConnectionFactory TO DTI;
GRANT EXECUTE ON spc_TesteConnectionFactory TO DTI;