in the statement "SELECT * FROM customers WHERE ID = 7;. what does this sign (*) mean? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

in the statement "SELECT * FROM customers WHERE ID = 7;. what does this sign (*) mean?

i am having this doubt because earlier "column_list" was written instead of this (*)

27th Dec 2016, 5:19 PM
mathew varghese
mathew varghese - avatar
6 Answers
+ 13
if only one id is there whose id = 7, then using * will output the details of the corresponding id. But if more IDs are there where ID=7 then it will output all the details line by line. if you have made the ID as Primary Key, then you cannot have more than one IDs where ID = 7.
28th Jan 2017, 10:45 AM
Siddharth Saraf
+ 6
wildcard symbol means "everything" (select everything from customers)
27th Dec 2016, 5:21 PM
Valen.H. ~
Valen.H. ~ - avatar
+ 3
*means all.... That means select all
7th Jan 2017, 7:18 AM
M$ Haz
M$ Haz - avatar
+ 2
yes, "*" means "all" and actually means the same thing across many different languages. so you select all from customers where ID=7
28th Dec 2016, 8:45 AM
Bryan
Bryan - avatar
+ 2
* in this context means all fields. however, the where clause will restrict the returned records to only those that have the ID of 7, and if it is structured properly, and the ID is a primary key, this will just be one record.
2nd Jan 2017, 1:49 AM
Thomas West
Thomas West - avatar
+ 2
Select All From Customers Where ID=7
2nd Jan 2017, 2:22 PM
chris