简体   繁体   English

如何将 select 数据放入一个表中?

[英]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.

相关问题 如何一次一次选择整个数据表? - How do I select entire table of data one row at a time? 如何在PostgreSQL的子表中选择数据? - How do I SELECT data from child table in PostgreSQL? 如何在MySQL中使用SELECT语句从一个表中获取数据,并从另一表中覆盖数据? - How do I take data from one table, and overwrite it from another table, with a SELECT statement in MySQL? 在 SELECT 命令中,如何使用一个表中的数据来指定另一个表中的数据? - In a SELECT command, how do I use data from one table to specify data in another? 如何使用select语句插入表中? - How do I insert into a table with a select statement? 在 SQL Select 上,如果我想查询另一个表中的可选数据,如何避免得到 0 结果? - On an SQL Select, how do i avoid getting 0 results if I want to query for optional data in another table? 如何从一个表中选择与表中的列值相匹配的数据? - How do I select data from one table where column values from that table match the conatenated column values of another table? 如何使用外部应用仅从一张表中选择数据? - How do I select data only from one table using outer apply? 如何将SQL数据从数据库表回显到 <select>形成? - How do I echo SQL data from database table into a <select> form? MySQL-如何从表中选择数据,并按两列的值之差排序? - MySQL - How do I to select data from a table, ordering by the difference between the values of two columns?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM