Select data from multiple tables and use aliases

code SELECT p.*, c.ID, c.Description as CategoryName FROM Products p, Categories c where p.CategoryID=c.ID Explanation This will select everything from products table and only 'ID' and 'Description' from categories table given the category IDs are same. Note that the alias for 'Products' table is p and Alias for 'Categories' table is c. Column 'Description' of... Continue Reading →

Blog at WordPress.com.

Up ↑

Create your own website, free on WordPress.com.Create your own website.
Start free