vkhare Posted October 6, 2014 Share Posted October 6, 2014 Hi, Below is the example query given for SQL Join in w3school. SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDateFROM OrdersINNER JOIN CustomersON Orders.CustomerID=Customers.CustomerID; however i have done some minor tweaking in above query but the o/p is totally different in my case. also taking long time to give o/p. please let me know where i am wrong. below is the query which i am using . SELECT o.OrderID, c.CustomerName, o.OrderDateFROM Orders as o, customers as cINNER JOIN CustomersON o.CustomerID=c.CustomerID; Link to comment Share on other sites More sharing options...
niche Posted October 6, 2014 Share Posted October 6, 2014 Try this: SELECT o.OrderID, c.CustomerName, o.OrderDate, c.CustomerIDFROM Orders as oINNER JOIN Customers as cON o.CustomerID=c.CustomerID; Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now