E-mail Print PDF

1
2
3
SELECT column_name(s)
FROM table_name
AS 

1
2
SELECT column_name AS 
FROM table_name

For this we use this query:

1
2
3
4
5
SELECT , , 
FROM Persons AS p,
Product_Orders AS po
WHERE ='Hansen'
WHERE =

1
2
3
4
5
SELECT , Persons.LastName, Persons.FirstName
FROM Persons,
Product_Orders
WHERE Persons.LastName='Hansen'
WHERE Persons.FirstName=

Comments

 
-4 #1 Игорь 2010-08-30 10:01 and where the result? Quote
 
 
+4 #2 Шелест Константин 2010-10-29 19:08
and where the result?


What's the difference what the result will be?!
Quote
 
 
+2 #3 Шелест Константин 2010-10-29 19:36 And secondly, to work all the above stated unfortunately will not be Why? that because

SELECT Product_Orders.OrderID, Persons.LastName, Persons.FirstName
FROM Persons,
Product_Orders

are two different tables and Product_Orders Persons, they have to connect through the INNER JOIN, if they have a common column (attribute ).

SELECT OrderID, ,
FROM Persons AS p,

INNER JOIN Product_Orders ON p.OrderID = Product_Orders.OrdrID

WHERE ='Hansen'
WHERE =

But the name the name of the table po Product_Orders I did not succeed. Who knows, please write. Thanks in advance
Quote
 
 
0 #4 student 2011-04-19 12:36 gmn ma how to change a column in sql table ... ??????? because the script above I try to not get it ... !!!!!!!! ! yes please help Quote
 
 
0 #5 Олег 2011-06-17 21:12 Still, you can use an alias for the function. For example, when you need to add all the values ​​in column 1 and column 2:
Quote
 
 
0 #6 Роман 2011-07-06 16:32
Still, you can use an alias for the function. For example, when you need to add all the values ​​in column 1 and column 2:


This is not an alias for the function, and the name of the column for query result
Quote
 
 
0 #7 Роман 2011-07-06 16:37 Incidentally, the official word AS is optional.

SELECT a.*
FROM Persons a,
WHERE UPPER(a.LastName) LIKE '%MAC%'
Quote
 

Authorization

Nice Ajax Poll

Which one of my extensions is the best?

Statistics

Translate

русскийitalianoDeutschEnglishLATVIANукраїнськаfrançaispolski
1

Advertisement