[英]How do i select data in a table?
So ive got a table named artists and it has multiple places of origin like UK, US, Ireland.所以我有一张名为艺术家的桌子,它有多个原产地,如英国、美国、爱尔兰。 What command would i put in if i just wanted to select the other countries excluding UK.
如果我只想 select 除英国以外的其他国家/地区,我会输入什么命令。
The following query will give all the info from artists
table excluding records having origin
value as 'UK'以下查询将提供
artists
表中的所有信息,不包括origin
值为“UK”的记录
Select * from artists where origin <> 'UK';
You want to use the SELECT statement to 'key in' what data you want, then use FROM
to highlight the specific data you want.您想使用 SELECT 语句“键入”您想要的数据,然后使用
FROM
突出显示您想要的特定数据。 The *
means all data FROM -----
. *
表示所有数据FROM -----
。 Use WHERE
to add a condition and I would recommend just using not as you are only using a column value so all together it would look like使用
WHERE
添加条件,我建议只使用 not 因为你只使用一个列值所以看起来像
SELECT * FROM artists WHERE origin NOT 'UK';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.