Creating a Page

Points to remember

  • Each page may contain a number of code snippets
  • Each code snippet should have a short title that briefly explains the code snippet
  • Code snippet should be correctly formatted. Correct indentation and correct casing of the keywords should be used.

writing the title

The title of the pages are very important. There are different ways of writing the titles. However, for the sake of uniformity, I would request you use one of the following patterns.

It is advised to use a 'how to' form whenever possible. For example: "How to take a full database backup in SQL Server").

When ever applicable, it is also acceptable to use an action form such as "Taking a full database backup in SQL Server"

writing the examples

If you refer to any objects that are not declared in your code, add a comment on the top to indicate that your code expect that the given object already exists. The code snippet below attempts to take a database backup, assuming that the database already exists. Note the comment on the top of the snippet with this assumption.

-- Database Name: AdventureWorks
BACKUP DATABASE AdventureWorks TO DISK = 'c:\temp\AdventureWorks.bak'

If your code tries to format output values, try to show the result along with your code snippet. Here is an example.

DECLARE @dt DATETIME
SELECT @dt = '2009-6-12' 
SELECT YEAR(@dt) AS Year
/*
Year
-----------
2009
*/
Share |

 Cant find the page you are looking for?
 Help us to improve by adding the content that you are looking for.
 Leave a feedback
 We look forward to hear your comments and feedback.