Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does * mean in sql?

Tags:

sql

For example, I know what SELECT * FROM example_table; means. However, I feel uncomfortable not knowing what each part of the code means.

like image 859
David Avatar asked Mar 08 '26 11:03

David


2 Answers

The second part of a SQL query is the name of the column you want to retrieve for each record you are getting.

You can obviously retrieve multiple columns for each record, and (only if you want to retrieve all the columns) you can replace the list of them with *, which means "all columns".

So, in a SELECT statement, writing * is the same of listing all the columns the entity has.

Here you can find probably the best tutorial for SQL learning.

like image 65
Pier Giorgio Misley Avatar answered Mar 11 '26 08:03

Pier Giorgio Misley


I am providing you answer by seperating each part of code.

SELECT == It orders the computer to include or select each content from the database name(table ) .

(*) == means all {till here code means include all from the database.}

FROM == It refers from where we have to select the data.

example_table == This is the name of the database from where we have to select data.

the overall meaning is :

include all data from the databse whose name is example_table.

thanks.

like image 33
vishal vivek Avatar answered Mar 11 '26 09:03

vishal vivek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!