jpa 查询编写sql
Essentially, SQL language allows us to retrieve and manipulate data on the data tables. In this article, we will understand and gain the ability to write fundamental SQL queries. At first, we will take a glance at the main notions that we need to know about in order to write database queries.
本质上,SQL语言允许我们检索和操作数据表上的数据。 在本文中,我们将了解并获得编写基本SQL查询的能力。 首先,我们将浏览一下为了编写数据库查询而需要了解的主要概念。
什么是T-SQL? (What is the T-SQL?)
SQL is the abbreviation of the Structured Query Language words and, it is used to query the databases. Transact-SQL (T-SQL) language is an extended implementation of the SQL for the Microsoft SQL Server. In this article, we will use the T-SQL standards in the examples.
SQL是结构化查询语言单词的缩写,用于查询数据库。 Transact-SQL(T-SQL)语言是Microsoft SQL ServerSQL的扩展实现。 在本文中,我们将在示例中使用T-SQL标准。
什么是关系数据库? (What is a Relational Database?)
Most simply, we can define the relational database as the logical structure in which data tables are kept that can relate to each other.
最简单的说,我们可以将关系数据库定义为逻辑结构,其中保持可以相互关联的数据表。
什么是数据表? ( What is a Data Table?)
A table is a database object that allows us to keep data through columns and rows. We can say that data tables are the main objects of the databases because they are holding the data in the relational databases.
表是一个数据库对象,它使我们能够保留列和行中的数据。 我们可以说数据表是数据库的主要对象,因为它们将数据保存在关系数据库中。
Assume that we have a table that holds the history class students’ details data. It is formed in the following columns.
假设我们有一个表保存历史课学生的详细数据。 它在以下几列中形成。
Name: Student name
姓名:学生姓名
SurName: Student surname
姓:学生姓
Lesson: Opted lesson
课程:选择的课程
Age: Student age
年龄:学生年龄
PassMark: Passing mark
PassMark:通过标记
We will use this table in our demonstrations in this article. The name of this data table is Student.
在本文的演示中,我们将使用此表。 该数据表的名称是Student。
我们的第一个查询:SELECT语句 (Our First Query: SELECT Statement)
The SELECT statement can be described as the starting or the zero point of the SQL queries. The SELE