博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
sql azure 语法_在Azure Data Studio中学习用于SQL Notebook的Markdown语言
阅读量:2514 次
发布时间:2019-05-11

本文共 10556 字,大约阅读时间需要 35 分钟。

sql azure 语法

Microsoft supports SQL Notebooks in Azure Data Studio. It is an exciting feature that allows creating a notebook for multiple languages such as Python, SQL, PowerShell. You might have heard about the Jupyter notebook. It is a popular web-based notebook that provides rich programming language support. SQL Notebook is an inspiration for the Jupyter notebook.

Microsoft在Azure Data Studio中支持SQL Notebook。 这是一项令人兴奋的功能,它允许为多种语言(例如Python,SQL,PowerShell)创建笔记本。 您可能听说过Jupyter笔记本。 它是一种流行的基于Web的笔记本,可提供丰富的编程语言支持。 SQL Notebook是Jupyter笔记本的灵感来源。

To follow along nicely, I would recommend going through the below articles:

为了更好地遵循,我建议您阅读以下文章:

You should also use the latest version of Azure Data Studio.

您还应该使用最新版本的Azure Data Studio。

  • Latest version: 1.15.0

    最新版本:1.15.0
  • Release date: February 15, 2020

    发布日期:2020年2月15日

Download the installer per the platform: Windows, macOS or Linux.

根据平台下载安装程序:Windows,macOS或Linux。

Download the installer for Azure Data Studio

Markdown语言概述 (Overview of Markdown language)

SQL Notebooks uses markdown language for text formatting. If you are familiar with GitHub, it uses markdown language for all forms such as read me file. We can do text formatting with its simplified method. It helps us to write easy-to-read, easy-to-write plain text with structurally valid XHTML.

SQL Notebook使用Markdown语言进行文本格式设置。 如果您熟悉GitHub,它将对所有形式(如自述文件)使用markdown语言。 我们可以使用其简化方法进行文本格式化。 它有助于我们使用结构有效的XHTML编写易于阅读,易于编写的纯文本。

HTML is a popular programming language. We use tags in HTML for defining text into various formats. For example, for a H1 heading, we use <h1>Title</h1> tags.

HTML是一种流行的编程语言。 我们使用HTML中的标签将文本定义为各种格式。 例如,对于H1标题,我们使用<h1> Title </ h1>标签。

Launch Azure Data Studio and open a SQL notebook.

启动Azure Data Studio并打开一个SQL笔记本。

SQL notebook

It opens a blank notebook, as shown below.

它将打开一个空白笔记本,如下所示。

Click on +Text and it opens a text block for you.

单击+文本,它将为您打开一个文本块。

Let’s do various formatting using markdown language.

让我们使用markdown语言进行各种格式化。

格式标题 (Format Headings)

The first step for a document is heading. We also require heading for different sections in the article. We want a different size for the headings and subheadings.

文档的第一步是标题。 我们还要求前往本文的不同部分。 我们希望标题和子标题的大小不同。

We use hash sign (#) preceding with the text and the number of # defines the heading font level. It supports up to six levels of headings.

我们在文本之前使用井号(#),并且#的数目定义了标题字体级别。 它最多支持六个级别的标题。

You can view difference in these heading font size in the following image.

您可以在下图中查看这些标题字体大小的差异。

# SQL Notebook 

#SQL笔记本

## SQL Notebook

## SQL笔记本

### SQL Notebook

### SQL笔记本

#### SQL Notebook

#### SQL笔记本

##### SQL Notebook

##### SQL笔记本

###### SQL Notebook

###### SQL笔记本

Headings in SQL Notebook

We can also use the following markdown code for first and second-level headings.

我们还可以将以下markdown代码用于第一和第二级标题。

SQL Notebooks

SQL笔记本

=======

=======

SQL Notebooks

SQL笔记本

———-

————

添加段落 (Add Paragraphs )

We write documents in many paragraphs. To specify a paragraph in the markdown language, leave an empty line. In the following example, we give an empty line after Hello but did not give any empty line after team. In the output, markdown language understands an empty line at the end of the paragraph. It treats the last two lines as a single paragraph.

我们在许多段落中编写文档。 要使用降价语言指定段落,请留空行。 在以下示例中,我们在Hello后面给出一个空行,但在team之后不给出任何空行。 在输出中,降价语言可以理解段落末尾的空行。 它将最后两行视为一个段落。

Paragraphs

格式化粗体文字 (Format Bold text)

We can enclose the text in double star( **), and it highlights text in bold format.

我们可以将文本括在双星号(**)中,并以粗体突出显示文本。

Bold text

格式化斜体文字 (Format Italic text)

Enclose the text in single star(*) and it changes the format for text in italic.

将文本括在单星号(*)中,它将更改斜体文本的格式。

Italic text

设置粗体和斜体文本 (Format Bold and Italic text)

We can combine both bold and italic format for text by enclosing text with three starts ***

我们可以通过用三个开始将文本括起来来将文本的粗体和斜体格式组合在一起** *

Bold and Italic text

在笔记本中创建项目符号列表 (Create bullet lists in the notebook)

You might be familiar with creating bullet lists in Microsoft Word document. We can create similar lists using markdown language.

您可能熟悉在Microsoft Word文档中创建项目符号列表。 我们可以使用markdown语言创建类似的列表。

无序列表 (Unordered lists)

Use prefix * followed by a space for the unordered lists. We can also create a nested list using this prefix.

使用前缀*,后跟一个空格表示无序列表。 我们还可以使用此前缀创建嵌套列表。

Create bullet Lists

In the above image, feature 1 and feature 2 are at the same level. Due to this, in markdown, we get a similar bullet for both.

在上图中,特征1和特征2处于同一级别。 因此,在降价促销中,我们为两者获得了类似的项目符号。

We can create a further nested list by changing the position of the text, as shown below.

我们可以通过更改文本的位置来创建另一个嵌套列表,如下所示。

Create nested bullet Lists

订购清单 (Ordered list)

The ordered list shows the sequence number for each line. We specify a number for each line, and it creates an ordered list.

有序列表显示每行的序列号。 我们为每行指定一个数字,并创建一个有序列表。

Create ordered bullet Lists

We can easily configure both ordered and unordered list combining both stars (*) and numbers as shown below

我们可以轻松地配置星号(*)和数字相结合的有序列表和无序列表,如下所示

Combination of ordered and unordered list

(Code)

We can add a word as a code format by enclosing it in backticks (`).

我们可以通过将单词括在反引号(`)中来将其添加为代码格式。

Code

块引用 (Blockquotes)

We can add a greater than(>) symbol in beginning of a paragraph, and it turns into a blockquote element.

我们可以在段落的开头添加一个大于(>)符号,它变成一个blockquote元素。

Blockquotes

To add multiple lines in the same blockquote, add > in each line.

要在同一blockquote中添加多行,请在每行中添加>。

multiple lines in the blockquote

嵌套块引用 (Nested Blockquotes)

Sometimes you require nested blockquotes as well. We can add >> for the nested blockquotes as shown below.

Nested Blockquotes

有时您也需要嵌套的blockquotes。 我们可以添加>>作为嵌套块引用,如下所示。

指定URL超链接 (Specifying URL hyperlink)

Sometimes, we include hyperlinks in a document as well so that users can click on the hyperlink and go to the reference website.

有时,我们还会在文档中包含超链接,以便用户可以单击超链接并转到参考网站。

We can create both inline and reference style links using the markdown language.

我们可以使用markdown语言创建内联和参考样式链接。

内联超链接 (Inline hyperlink)

Inline hyperlinks are similar to a word document hyperlink. We specify it in the following format.

内联超链接类似于Word文档超链接。 我们以以下格式指定它。

[Text to display] (URL)

[显示的文字](URL)

参考样式链接 (Reference Style Links)

We can also create a referenced style links in markdown language. Suppose we want to use the same URL hyperlink in multiple places like reference articles from Microsoft Word. We can either create an inline hyperlink each time or use a reference style hyperlink.

我们还可以使用markdown语言创建引用的样式链接。 假设我们想在多个地方使用相同的URL超链接,例如Microsoft Word的参考文章。 我们可以每次创建一个内联超链接,也可以使用引用样式超链接。

In the following example, we specify [Link 1] text multiple time and later referenced that text for the URL. It saves efforts for us to specify inline hyperlink and users can also know that all these references are from a single URL. You can see these reference style hyperlink on a website like Wikipedia.

在以下示例中,我们多次指定[Link 1]文本,然后在URL中引用该文本。 它为我们节省了指定内联超链接的工作,用户还可以知道所有这些引用均来自单个URL。 您可以在类似Wikipedia的网站上看到这些参考样式超链接。

图片参考 (Image reference)

We can reference an image using an exclamation mark (!) symbol and add an alt-text in the square brackets along with the image URL. In the following example, we can see the Wikipedia logo in SQL Notebook using markdown language.

我们可以使用感叹号(!)符号引用图像,并在方括号中添加替代文本以及图像URL。 在下面的示例中,我们可以使用markdown语言在SQL Notebook中看到Wikipedia徽标。

![Wikipedia](https://upload.wikimedia.org/wikipedia/en/8/80/Wikipedia-logo-v2.svg “Wikipedia”)

![Wikipedia](https://upload.wikimedia.org/wikipedia/en/8/80/Wikipedia-logo-v2.svg“ Wikipedia”)

Image reference

We can also create a reference style image reference in the markdown similar to the reference URL. For this, we can use the below format.

我们还可以在markdown中创建类似于参考网址的参考样式图片参考。 为此,我们可以使用以下格式。

[logo]: https://upload.wikimedia.org/wikipedia/en/8/80/Wikipedia-logo-v2.svg “Wikipedia”

![wikipedia][logo]

[徽标]:https://upload.wikimedia.org/wikipedia/en/8/80/Wikipedia-logo-v2.svg“ Wikipedia”

![wikipedia] [徽标]

Image reference style

添加水平尺 (Add Horizontal Rule)

We can create a horizontal rule by enclosing text *** symbol(three or more) followed by a line break. You can see a horizontal rule in the below image.

我们可以通过将文字***符号(三个或更多个)后接换行符来创建水平尺。 您可以在下图中看到水平尺。

在文本中指定电子邮件 (Specify email in the text)

We can enclose email address in <> symbol so that it appears as a hyperlink in the output.

我们可以将电子邮件地址括在<>符号中,以便其在输出中显示为超链接。

Specify email in the text

转义字符 (Escape characters)

As I explained earlier, we use * for an unordered list. Suppose we want to print this character as well in the output. In this case, add a backslash to skip the behavior of * in markdown language.

如前所述,我们将*用于无序列表。 假设我们还要在输出中打印此字符。 在这种情况下,请添加反斜杠以跳过Markdown语言中*的行为。

Escape characters

在笔记本中添加表格 (Add Tables in a notebook)

Markdown does not specify code for tables, but still, we can create them.

Markdown并没有为表指定代码,但是我们仍然可以创建它们。

  • We use colons to align the columns

    我们使用冒号对齐列
  • We require at least three dashes to separate column headers

    我们需要至少三个破折号来分隔列标题
  • We can use outer pips for separating columns

    我们可以使用外部点来分隔列

Here is the markup code for an employee table with three columns- EmployeeName, Location and designation.

这是一个雇员表的标记代码,该表具有三列-EmployeeName,Location和designation。

| EmployeeName        | Location           | Designation  |

| 员工姓名| 位置| 名称

| ————- |:————-:| —–:|

| ————- | |:————-:| -:|

| Rajendra Gupta      | India | Sr. Consultant |

| Rajendra Gupta | 印度| 高级顾问|

| Kusum Agarwal      | India     |   Physiotherapist |

| Kusum Agarwal | 印度| 物理治疗师|

| Akshita Gupta | India    |    Intern |

| Akshita Gupta | 印度| 实习生|

Tables

在笔记本中添加视频 (Add Videos in the notebook)

We do not have a direct method to add a video link in the markdown language. But, there is always a workaround.

我们没有直接方法以降价语言添加视频链接。 但是,总有一种解决方法。

Follow the below steps to add a video reference in SQL notebook.

请按照以下步骤在SQL Notebook中添加视频参考。

  • Extract a thumbnail of the video you wish to create a reference. You can either take a screenshot of the video or use third-party tools for the thumbnail of it

    提取要创建参考的视频的缩略图。 您可以拍摄视频的屏幕截图,也可以使用第三方工具制作视频缩略图
  • Create a reference link for the video

    为视频创建参考链接

For this demonstration, I am using the YouTube video link and using an image for thumbnail purposes.

对于此演示,我使用YouTube视频链接并将图像用于缩略图。

[![SQL Server 2019](C:\Users\rajen_000\Pictures\SQL2019.JPG)](http://www.youtube.com/watch?v=mKlAyvvR70I “SQL 2019”)

[![SQL Server 2019](C:\ Users \ rajen_000 \ Pictures \ SQL2019.JPG)](http://www.youtube.com/watch?v=mKlAyvvR70I“ SQL 2019”)

It renders an image, as shown below.

它将渲染图像,如下所示。

Click on the image, and it asks your permission to open the external Website.

单击图像,它会征求您的许可以打开外部网站。

Click open, and it plays the YouTube video in the browser.

单击打开,它将在浏览器中播放YouTube视频。

Open URL

结论 (Conclusion)

In this article, we explored markdown language to do formatting in a SQL Notebook of Azure Data Studio. I have covered most of the formatting options, and you can combine those for preparing a handbook with better visualization and useful pieces of information.

在本文中,我们探索了降价语言以在Azure Data StudioSQL Notebook中进行格式化。 我已经介绍了大多数格式设置选项,您可以将它们与更好的可视化效果和有用信息结合起来,以编写手册。

翻译自:

sql azure 语法

转载地址:http://jsswd.baihongyu.com/

你可能感兴趣的文章
Azure ARMTemplate模板,VM扩展命令
查看>>
使用Masstransit开发基于消息传递的分布式应用
查看>>
[CF808A] Lucky Year(规律)
查看>>
关于推送遇到的一些问题
查看>>
寒假作业3 抓老鼠啊~亏了还是赚了?
查看>>
Orcal Job创建实例
查看>>
Django
查看>>
批量Excel数据导入Oracle数据库(引用 自 wuhuacong(伍华聪)的专栏)
查看>>
处理移动障碍
查看>>
优化VR体验的7个建议
查看>>
2015年创业中遇到的技术问题:21-30
查看>>
《社交红利》读书总结--如何从微信微博QQ空间等社交网络带走海量用户、流量与收入...
查看>>
JDK工具(一)–Java编译器javac
查看>>
深入.NET框架与面向对象的回顾
查看>>
改变label中的某字体颜色
查看>>
七牛云存储之应用视频上传系统开心得
查看>>
struts2日期类型转换
查看>>
Spark2-数据探索
查看>>
Http和Socket连接区别
查看>>
Angular2,Springboot,Zuul,Shiro跨域CORS请求踩坑实录
查看>>