Selectia
Stefanescu Mihai 3 years ago SQL
Acest articol face parte din cursul Toate lectiile SQL.
Te poti inscrie la acest curs aici!
Comanda SELECT este folosita pentru a afisa informatiile stocate intr-un tabel dintr-o baza de date. Acest rezultat returnat se numeste set de rezultate (result-set).
SELECT Coloana1, Coloana2, ColoanaN FROM numeTabel;
In exemplul de mai sus vor fi afisate decat valorile coloanelor trecute in select. Daca doriti sa afisati toate datele din tabel folositi urmatoarea sintaxa:
SELECT * FROM numeTabel;
Exemplu
Presupunem ca avem urmatorul tabel angajati cu aceste informatii:
+----+----------+--------+--------------+-----------+ | ID | NUME | VARSTA | ADRESA | SALARIU | +----+----------+--------+--------------+-----------+ | 1 | Mihai | 22 | Bucuresti | 10000.00 | | 2 | Alex | 25 | Pitesti | 1500.00 | | 3 | George | 23 | Cluj | 2000.00 | | 4 | Mircea | 25 | Iasi | 6500.00 | +----+----------+--------+--------------+-----------+
Mai jos am scris o interogare ce va selecta decat coloanele ID, Nume si Salariu din tabelul angajati:
SELECT ID, NUME, SALARIU FROM angajati
Acest cod va avea urmatorul rezultat:
+----+----------+-----------+ | ID | NUME | SALARIU | +----+----------+-----------+ | 1 | Mihai | 10000.00 | | 2 | Alex | 1500.00 | | 3 | George | 2000.00 | | 4 | Mircea | 6500.00 | +----+----------+-----------+
Daca doriti sa selctati toate coloanele din tabelul angajati folositi urmatoarea interogare:
SELECT * FROM angajati;
Get in touch
Pentru nelamuriri, dubii, comentarii si chestii de pe suflet ne putem auzi pe Discord, Reddit sau poti deschide o discutie noua pe forum
Get Glipizide online for diabetes without a prescription at a low price
#
8 months ago
Buy diabetes medication online with delivery Want to save
some cash on diabetes meds? Check out these online pharmacies
with free delivery
Discounted online generics for sale with no prescription Safe
and affordable online generic pharmacy
I am sure this piece of writing has touched all the internet people, its really really good post
on building up new blog.
It's very trouble-free to find out any topic on net as compared to books, as I found this piece of writing
at this web page.
bookmarked!!, I really like your site!
Excellent post. I used to be checking constantly this blog and
I'm impressed! Extremely useful info specially the closing section :) I maintain such information much.
I was looking for this particular info for a very lengthy time.
Thank you and good luck.
Ahaa, its fastidious discussion concerning this paragraph here at this weblog, I have read all that, so now me
also commenting here.
If you desire to improve your know-how only keep visiting this website and be updated with the latest gossip posted here.
Fabulous, what a weblog it is! This webpage gives useful facts to us,
keep it up.
I ddo consider alll oof the ideas you hve introduced oon your post.
Theyy aare very convincing annd can dwfinitely work.
Still, thee posts arre too brieff forr newbies.
Could yoou please leengthen themm a bit freom subseequent time?
Thank yyou for tthe post.
Pretty! This has been an incredibly wonderful post.
Thanks for supplying these details.
I couldn't refrain from commenting. Very well written!
I've been browsing online more than three hours nowadays, but I never discovered any fascinating article like yours.
It is pretty value enough for me. In my opinion, if all site owners and bloggers made just
right content material as you probably did, the
internet might be much more helpful than ever before.
I am sure this article has touched all the internet
viewers, its really really fastidious article
on building up new webpage.
Hello There. I found your weblog the use of msn. That is an extremely well written article.
I will make sure to bookmark it and return to learn more
of your useful info. Thank you for the post. I will certainly return.
I love your blog.. very nice colors & theme.
Did you create this website yourself or did you hire someone to do it for you?
Plz reply as I'm looking to design my own blog and would like to find
out where u got this from. thank you
Hi there, just became aware of your blog through Google, and
found that it is really informative. I am going to watch out for brussels.
I will be grateful if you continue this in future.
Lots of people will be benefited from your writing.
Cheers!
I think this is one of the most important info for me.
And i'm glad reading your article. But wanna remark on some general things, The website style is wonderful,
the articles is really excellent : D. Good
job, cheers
I read this piece of writing completely concerning the comparison of most recent and earlier technologies, it's awesome article.
Thank you for sharing your info. I really appreciate your efforts and
I will be waiting for your further post thanks once again.
Thanks for finally writing about >Selectia - Invata-Programare <Liked it!