HackStuff...
Aici veti gasi o gama larga de metode de hack atat pe Windows cat si pe platforme Linux/Unix , programe , tutoriale etc. In acelasi timp veti avea si asistenta help . Precizam ca tot ce se gaseste pe acest site este doar in scop de dezvoltare iar voi va asumati intreaga raspundere pt actiunile savarsite.ENJoY --- by andreony ---
|
Lista Forumurilor Pe Tematici
|
HackStuff... | Reguli | Inregistrare | Login
POZE HACKSTUFF...
Nu sunteti logat.
|
Nou pe simpatie: Elena01 Profile
 | Femeie 25 ani Braila cauta Barbat 28 - 40 ani |
|
andreony
[admin]
 Din: bucharest
Inregistrat: acum 20 ani
Postari: 1062
|
|
Baze de date – 2
LMD – Limbajul de manipulare a datelor
SELECT
Afiseaza date din una sau mai multe tabele.
Sintaxa
SELECT [ALL | DISTINCT] [TOP nExpr [PERCENT]] [Alias.] Select_Item [AS Column_Name] [, [Alias.] Select_Item [AS Column_Name] ...] FROM [FORCE] [DatabaseName!]Table [Local_Alias] [[INNER | LEFT [OUTER] | RIGHT [OUTER] | FULL [OUTER] JOIN DatabaseName!]Table [Local_Alias] [ON JoinCondition …] [[INTO Destination] | [TO FILE FileName [ADDITIVE] | TO PRINTER [PROMPT] | TO SCREEN]]
[PREFERENCE PreferenceName] [NOCONSOLE] [PLAIN] [NOWAIT] [WHERE JoinCondition [AND JoinCondition ...] [AND | OR FilterCondition [AND | OR FilterCondition ...]]] [GROUP BY GroupColumn [, GroupColumn ...]] [HAVING FilterCondition] [UNION [ALL] SELECTCommand] [ORDER BY Order_Item [ASC | DESC] [, Order_Item [ASC | DESC] ...]]
Arguments
SELECT Specifies the fields, constants, and expressions that are displayed in the query results.
ALL By default, displays all the rows in the query results.
DISTINCT Excludes duplicates of any rows from the query results.
Note You can use DISTINCT only once per SELECT clause.
TOP nExpr [PERCENT] Specifies that the query result contains a specific number of rows or a percentage of rows in the query result. You must include an ORDER BY clause when you include the TOP clause. The ORDER BY clause specifies the columns on which the TOP clause determines the number of rows to include in the query result.
You can specify from 1 to 32,767 rows. Rows with identical values for the columns specified in the ORDER BY clause are included in the query result. Therefore, if you specify 10 for nExpr, the query result can contain more than 10 rows if there are more than 10 rows with identical values for the columns specified in the ORDER BY clause. INNER JOIN specifies that the query result contains only rows from a table that match one or more rows in another table.
LEFT [OUTER] JOIN specifies that the query result contains all rows from the table to the left of the JOIN keyword and only matching rows from the table to the right of the JOIN keyword. The OUTER keyword is optional; it can be included to emphasize that an outer join is created.
RIGHT [OUTER] JOIN specifies that the query result contains all rows from the table to the right of the JOIN keyword and only matching rows from the table to the left of the JOIN keyword. The OUTER keyword is optional; it can be included to emphasize that an outer join is created.
FULL [OUTER] JOIN specifies that the query result contains all matching and non matching rows from both tables. The OUTER keyword is optional; it can be included to emphasize that an outer join is created.
EXEMPLE :
Sa se vizualizeze toate informaţiile despre emitenti:
select * from emitenti
Sa se vizualizeze toate informaţiile despre emitenti ordonat dupa simbol descrescator:
select * from emitenti order by cap_soc desc
Sa se vizualizeze toate informaţiile despre primii 2 emitenti ordonati dupa simbol descrescator:
select * top 2 from emitenti order by simb desc
Sa se vizualizeze denumirea si capitalul social al fiecărui emitent
select denumire,cap_soc from emitenti
Sa se afiseze emitentii care au simbolul TLV sau SNP
Select * from emitenti where simb in ('TLV','SNP')
Sa se afiseze o singura data toate pietele pe care se tranzactioneze emitentii
select distinct piata from emitenti
Sa se afiseze toti emitentii a caror denumire incepe cu S sau s
Select * from emitenti where denumire like "S%" or denumire like "S%"
Se se afiseze emitentii care au pe penultima pozitie A
Select * from emitenti where denumire like "%A_"
Sa se afiseze toti emitentii care au capitalul social intre 200 si 5000
select * from emitenti where cap_soc between 200 and 5000
Sa se afiseze denumire emitent, data, cotatie (pret)
Select denumire,data_c,pret from cotatii c, emitenti e where c.simb=e.simb
Sau
Select denumire,data_c,pret from cotatii c inner join emitenti e on c.simb=e.simb
Sa se afiseze si emitentii care nu au cotatii
Select denumire,data_c,pret from cotatii c, emitenti e where c.simb=e.simb(+)
Sau
Select denumire,data_c,pret from cotatii c right outer join emitenti e on c.simb=e.simb
Sa se afiseze cotatiile care nu corespund unui emitent (merge daca pe insert e setat ignore)
Select denumire,data_c,pret from cotatii c left outer join emitenti e on c.simb=e.simb
UPDATE
Modifica inregistrarile dintr-o tabela.
Sintaxa
UPDATE [DatabaseName1!]TableName1 SET Column_Name1 = eExpression1 [, Column_Name2 = eExpression2 ...] WHERE FilterCondition1 [AND | OR FilterCondition2 ...]]
Sa se majoreze capitalul social al SNP-ului cu 10%
Update emitenti set cap_soc=cap_soc*1.10 where simb='SNP'
Sa se incrementeze cotatiile de pe 01-01-2005
Update cotatii set pret=pret+1 where data_c=ctod("01-01-05"
DELETE
Sterge inregistrarile dintr-o tabela.
Sintaxa
DELETE FROM [DatabaseName!]TableName [WHERE FilterCondition1 [AND | OR FilterCondition2 ...]]
Sa se stearga toate cotatiile
Delete from cotatii
Sa se stearga emitentul SNP
Delete from emitenti where simb='SNP'
_______________________________________ ------ eVoLuTiOn ------
|
|
| pus acum 20 ani |
|