我不太明白它们之间的区别,例如:
SELECT [Products].[ID], [Products].[ProductName] FROM Products ORDER BY [ProductName];和....相比
SELECT Products.ID, Products.ProductName FROM Products ORDER BY ProductName;有人可以给我一些见解吗? 该查询为我生成相同的结果。
I don't quite understand the difference between, for example:
SELECT [Products].[ID], [Products].[ProductName] FROM Products ORDER BY [ProductName];compared with
SELECT Products.ID, Products.ProductName FROM Products ORDER BY ProductName;Can someone give me some insight please? The query produces same result for me.
最满意答案
在编程语言中,变量名称在其上下文中必须是唯一的,并且不能包含空格 。
VariableA is valid variable b is not valid variable_b is valid有些语言甚至区分大小写。
variableA is valid VariableA is valid and different from variableA另一方面,MS ACCESS允许表格,查询,表格等的免费格式化名称。这意味着你可以有一个名为的表
This is a fruit table识别“这是一个水果表”作为一个单词/项目访问以某种方式需要评估/知道变量名称是一个单词或其变量名称而不是文本。 因此,Access使用[]来封装单词,以便它可以评估其内容。
如果您遵循最理想的编码风格,您可以使用tbl_fruits,frm_fruits,qry_view_fruits等前缀命名您的表格,这将有助于您和Access了解您所指的内容。
In a programming language a variable name must be unique throughout its context and cannot have Spaces.
VariableA is valid variable b is not valid variable_b is validSome languages are even case sensitive.
variableA is valid VariableA is valid and different from variableAOn the other hand MS ACCESS allows free formatted names for it tables, queries, forms etc. This means you could have a table called
This is a fruit tableto identify "this is a fruit table" as one word/item Access somehow needs to evaluate/know that the variable name is one word or its a variable name and not a text. Therefore Access uses [] to encapsulate the word so it can evaluate its content.
if you follow a most desired coding style you would name your tables with prefix such as tbl_fruits, frm_fruits, qry_view_fruits which will help you as well as Access to understand what you are referring to.
更多推荐
发布评论