question

luggg avatar image
luggg asked

How to place code in my post and keep its format

I want to place some code of more than one line, but they become a single line. E.g. use master go select * from sysdatabases go How to make code format correctly? Thanks
date-format
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
DaveC avatar image
DaveC answered
Can you screengrab what you're seeing? If I type that out on separate lines, it displays on separate lines, e.g: use MASTER GO SELECT FROM sysdatabases go FYI, the markdown for code is four spaces at the start of a line. These should be inserted automatically when you add a new line or copy your code. If you remove these it will cause the code to display incorrectly.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.