59 lines
699 B
Plaintext
59 lines
699 B
Plaintext
include::../description.adoc[]
|
|
|
|
== Noncompliant Code Example
|
|
|
|
[source,sql]
|
|
----
|
|
CREATE PROCEDURE sp_PrintMagicNumber
|
|
AS
|
|
BEGIN
|
|
PRINT 42
|
|
END
|
|
GO
|
|
|
|
CREATE FUNCTION MagicNumber()
|
|
RETURNS INT
|
|
AS
|
|
BEGIN
|
|
RETURN 42
|
|
END
|
|
GO
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
[source,sql]
|
|
----
|
|
CREATE PROCEDURE usp_PrintMagicNumber
|
|
AS
|
|
BEGIN
|
|
PRINT 42
|
|
END
|
|
GO
|
|
|
|
CREATE FUNCTION fn_MagicNumber()
|
|
RETURNS INT
|
|
AS
|
|
BEGIN
|
|
RETURN 42
|
|
END
|
|
GO
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
include::../parameters.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|