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;

 

Programator de ~8 ani, am lucrat la proiecte din mai multe industrstrii, de la eCommerce la telecomunicatii la automatizari. In acest timp am folosi diferite tehnologii, de la PHP, MySQL, PostgreSql, RabbitMq, Redis, Memcached si altele.


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
Liquid Electrolyte Supplement # 8 months ago I am sure this piece of writing has touched all the internet people, its really really good post on building up new blog.
acheter du flavoxate en Europe # 4 months ago 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.
acheter xybilun en Belgique sans problème # 4 months ago bookmarked!!, I really like your site!
precio de buspar con receta en Bruselas # 3 months ago 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.
Sang # 3 months ago Ahaa, its fastidious discussion concerning this paragraph here at this weblog, I have read all that, so now me also commenting here.
Cheryl # 3 months ago If you desire to improve your know-how only keep visiting this website and be updated with the latest gossip posted here.
Saundra # 3 months ago Fabulous, what a weblog it is! This webpage gives useful facts to us, keep it up.
https://porngenerator.win/new-teen-sister-pussy/ # 2 months ago 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.
Einkauf von amoxicillin in Italien online # 2 months ago Pretty! This has been an incredibly wonderful post. Thanks for supplying these details.
albenza à prix compétitif en Espagne # 2 months ago I couldn't refrain from commenting. Very well written!
retin-a met medisch voorschrift # 2 months ago 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.
sprzeda? online myambutol 600 mg w Bia?ymstoku # 2 months ago I am sure this article has touched all the internet viewers, its really really fastidious article on building up new webpage.
Realiza una compra de crestor en España # 2 months ago 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.
grisefuline disponibile online in Italia # 2 months ago 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
lysurone 100 mg precio en Costa de Marfil # 1 month ago 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!
venta libre de metformin en España # 1 month ago 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
nessuna prescrizione necessaria per acquistare aldara in Svizzera # 1 month ago I read this piece of writing completely concerning the comparison of most recent and earlier technologies, it's awesome article.
zakup markowego brahmi Mylan # 3 days ago Thank you for sharing your info. I really appreciate your efforts and I will be waiting for your further post thanks once again.
sitagliptin en línea sin receta # 2 days ago Thanks for finally writing about >Selectia - Invata-Programare <Liked it!
Club-ul este dedicat membrilor si ofera access la mai multe zone ale website-ului.
Login Register

🔖 Bookmarks
✨ Pentru a sustine aceasta comunitate am sa te rog sa te autentifici sau sa te inregistrezi!

🌪️ Discord
Back to top
Folosim cookie-uri pentru a oferi functionalitatile critice ale aplicatiei Invata-Programare. Folosim cookie-uri si pentru a analiza traficul, pentru care e nevoie de consimtamantul dvs. explicit.