Click here to Skip to main content
15,860,844 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
1) i have two tables Student and Course

i apply the query

select * from Student Natural join Course

this query gives error incorrect syntax near Course

2)what is JOIN USING CLAUSE
3)what is JOIN ON CLAUSE
Posted

With join an condition is expected. so use like
SQL
select * from Student  join Course on Student.SameCol1=Course.SameCol1



for other two see
Difference between On clause and Where clause when used with left join in SQL Server[^]
 
Share this answer
 
Is Google broken at your place?

Internet is full of good article on JOINS. Loom here:

http://msdn.microsoft.com/en-us/library/ms191517(v=sql.105).aspx[^]

http://www.w3schools.com/sql/sql_join.asp[^]

Your query should be somelike this:

SQL
--I am assuming the column names
SELECT 
	*
FROM
	Students AS S INNER JOIN Course AS C ON
		S.CourseID = C.ID
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900