为项目创建表sql查询(项目ID,项目名称,项目描述) [英] Creating table sql query for items(item id, item name , item description)
本文介绍了为项目创建表sql查询(项目ID,项目名称,项目描述)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嘿所有人 请帮我制作这个项目表我多次试过但显示语法错误
hey everyone plese help me in making this table of items i tried many times but its showing syntax error
推荐答案
我注意到列中有空格。名字 包含空格或其他特殊字符的对象名称必须用方括号括起来,例如
SELECT [item id],[item name],[item description]
FROM项目
ORDER BY [项目名称];
$
最好不要在对象名称中使用空格,但是,要使用CamelCase,例如
SELECT ItemId,ItemName,ItemDescription
FROM Items
ORDER BY ItemName;
$
或用下划线字符表示空格:
SELECT item_id,item_name,item_description
FROM项目
ORDER BY item_name;
I notice that you have spaces in the column names. Object names which include spaces or other special characters must be enclosed in square brackets, e.g.
SELECT [item id], [item name], [item description]
FROM Items
ORDER BY [item name];
It is better not to use spaces in object names, however, but to use CamelCase, e.g.
SELECT ItemId, ItemName, ItemDescription
FROM Items
ORDER BY ItemName;
or to represent spaces by underscore characters:
SELECT item_id, item_name, item_description
FROM Items
ORDER BY item_name;
这篇关于为项目创建表sql查询(项目ID,项目名称,项目描述)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文