Accueil   |   Forums   |  Offres d'emplois   |  Contact    |   Mon compte   
vendredi 22 août 2008 Rechercher :
Déposez votre CV gratuitement sur touslesemplois
 
comparer les prix
» Logiciels
» Jeux vidéos
» Matériel Informatique


» ASP.NET
» ASP
» SQL
» PHP
» JAVASCRIPT
» XML
 


» ACTUALITÉ / DIVERS
» DROIT DE L'INTERNET
» INFOS VIRUS
» PATCHS MICROSOFT
» SÉCURITÉ
» BASES DE DONNÉES
» DOWNLOAD .NET
» LOGITHÈQUE
» SERVICES WEB
» Y SONT FOUS !
» .NET
» ASP
» ASP.NET
» JAVA
» PHP
» XML
» LANGAGE C#
» LANGAGE VB.NET
» UNIX / LINUX
» WINDOWS
» EVÈNEMENTS
» GASP
» MICROSOFT
 


Vous êtes ici : Forums > Langage SQL > difference entre 2 requete?

difference entre 2 requete?
bonjour
qq'un peut il me dire quelle est la difference entre ces 2 requetes:

requete1
----------------------------------
select *
from tabA, tabB
where tabA.ref_tabB=tabB.Id_tabB
----------------------------------

requete2
---------------------------------
select *
from tabA
inner join tabB
on tabB.Id_tabB=tabA.ref_tabB
---------------------------------

moi je ne vois aucune difference.
merci

Message posté le 17/07/2002 par jean

Répondre à ce message
 
AuteurRéponse 
yo
17/07/2002
RE : difference entre 2 requete?
il n'y en a pas... :-( ...
Répondre
jean
17/07/2002
RE : RE : difference entre 2 requete?
mais alors quel est l'avantage du mot cle "inner join"? merci ...
Répondre
madbison
17/07/2002
RE : RE : RE : difference entre 2 requete?
Voila ce k'en dit le MSDN :-(

INNER JOIN Operation


Combines records from two tables whenever there are matching values in a common field.

Syntax

FROM table1 INNER JOIN table2 ON table1.field1 compopr table2.field2

The INNER JOIN operation has these parts:

Part Description
table1, table2 The names of the tables from which records are combined.
field1, field2 The names of the fields that are joined. If they aren't numeric, the fields must be of the same data type and contain the same kind of data, but they don't have to have the same name.
compopr Any relational comparison operator: "=," "<," ">," "<=," ">=," or "<>."


Remarks

You can use an INNER JOIN operation in any FROM clause. This is the most common type of join. Inner joins combine records from two tables whenever there are matching values in a field common to both tables.

You can use INNER JOIN with the Departments and Employees tables to select all the employees in each department. In contrast, to select all departments (even if some have no employees assigned to them) or all employees (even if some aren't assigned to a department), you can use a LEFT JOIN or RIGHT JOIN operation to create an outer join.

If you try to join fields containing Memo or OLE Object data, an error occurs.

You can join any two numeric fields of like types. For example, you can join on AutoNumber and Long fields because they are like types. However, you cannot join Single and Double types of fields.

The following example shows how you could join the Categories and Products tables on the CategoryID field:

SELECT CategoryName, ProductName
FROM Categories INNER JOIN Products
ON Categories.CategoryID = Products.CategoryID;

In the preceding example, CategoryID is the joined field, but it isn't included in the query output because it isn't included in the SELECT statement. To include the joined field, include the field name in the SELECT statement ? in this case, Categories.CategoryID.

You can also link several ON clauses in a JOIN statement, using the following syntax:

SELECT fields
FROM table1 INNER JOIN table2
ON table1.field1 compopr table2.field1 AND
ON table1.field2 compopr table2.field2) OR
ON table1.field3 compopr table2.field3)];

You can also nest JOIN statements using the following syntax:

SELECT fields
FROM table1 INNER JOIN
(table2 INNER JOIN [( ]table3
[INNER JOIN [( ]tablex [INNER JOIN ...)]
ON table3.field3 compopr tablex.fieldx)]
ON table2.field2 compopr table3.field3)
ON table1.field1 compopr table2.field2;

A LEFT JOIN or a RIGHT JOIN may be nested inside an INNER JOIN, but an INNER JOIN may not be nested inside a LEFT JOIN or a RIGHT JOIN.

a+ ...
Répondre


Proregna - L'hébergement ASP.NET


A RETENIR CETTE SEMAINE
16/07/2008 - Windows Server 2008 : Network Access Protection
Le nouveau système d’exploitation serveur de Microsoft, Windows Server 2008, apporte avec lui de nou ...
16/07/2008 - Webcasts - Développement parallèle, à l'aube d'une nouvelle ère
Avec l'avénement des multi-coeurs, le développement parallèle devient une necéssité. Dans cette séri ...
16/07/2008 - J'en ai rien à coder - Votre devoir de vacances sur Silverlight !
Qu'est-ce que Silverlight ? Une nouvelle technologie Web permettant d'exécuter des RIA sur un large ...
16/07/2008 - Quelques petits tests sur les bases embarquées
Dans ce billet, Ayende réalise un benchmarking de plusieurs "petites" bases de données embarquées. S ...
15/07/2008 - Présentation d'ASP.NET Dynamic Data
Dynamic Data est une nouvelle technologie inclue dans l' "Asp.net 3.5 Extension CTP ". Elle fournit ...
15/07/2008 - Silverlight 2 - Les webcasts de l'événement sont en ligne
L’objectif de cette journée était de comprendre les limitations de Silverlight 1, et d’appréhender l ...
15/07/2008 - Cache transparent et Entity Framework
La gestion du cache (1er et second niveau) est une fonctionnalité très importante d'un outil de mapp ...
(c) 1999-2006 ASP MAGAZINE SARL
Partenaires : Codes sources c2i ASP-PHP
Hébergement serveurs dédiés Windows


Hit-Parade