Answer the question
In order to leave comments, you need to log in
How to understand what is written here?
Help me figure out the SQL query, I can’t understand why quadrant brackets are needed, i.e. why are they even needed in the example and T-SQL in general?
SELECT TOP (10) [M].[membershipId]
FROM Membership AS [m]
Answer the question
In order to leave comments, you need to log in
The parentheses are required if you use keywords or special characters in column names or identifiers. You can name the column [First Name] (with a space) - but then you will need to use parentheses every time you refer to that column. Otherwise, square brackets are optional.
For example, your request could be written like this:
SELECT TOP (10) m.membershipId FROM Membership AS m;
SELECT TOP (10) m.[Member Name] FROM [Service Membership] AS m;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question