[英]I am having issues with a syntax error in PostgreSQL. I am trying to add a query and it is giving me an error
I am taking a Data Analysis Course on Udemy.我正在 Udemy 上学习数据分析课程。 I am using PostgreSQL.
我正在使用 PostgreSQL。 On one of my exercises, I tried to add a column of data and recieved a Syntax Error Message.
在我的一个练习中,我尝试添加一列数据并收到一条语法错误消息。 Here is a screen shot of my code:
这是我的代码的屏幕截图:
can someone help with this?有人可以帮忙吗?
What you're showing is a select statement你显示的是一个选择语句
SELECT DISTINCT CustomerName, Region, Industry
FROM sales
WHERE Region = 'West'
To add another criterion, use and
as follows要添加另一个标准,请使用
and
如下
SELECT DISTINCT CustomerName, Region, Industry
FROM sales
WHERE Region = 'West'
AND Industry = 'BusinessServices'
If you want to add a column to the table itself, proceed as follows如果要向表本身添加一列,请按以下步骤操作
alter table sales add column Industry varchar
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.