SQL introductory learning record-01- query table record

Query table record

select userid,username from [dbo].[userinfo]
select : indicates query, fixed wording
userid, username: indicates the classification of the query database, which can be understood as which variety in the fruit I want to query
from: represents the data source, where does the data come from The meaning of
[dbo].[userinfo]: indicates the name
of the database. Linked to see it is: query [dbo].[userinfo] the userid and username classified data in this database

select distinct code from [dbo].[Wafdhouse];
distinct : indicates the data value of the code classification in the [dbo].[Wafdhouse] database, and the duplicate records in it are displayed only once.
If there is a data value in the code category, it is 70, then you can't find the second 70.

select top 100 * from [dbo].[Vendor]
top : Indicates the number of rows before the query,
where top 100 is displayed, only the first 100 rows of data are displayed

Guess you like

Origin blog.csdn.net/weixin_48116269/article/details/114970153