Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to relationship query two different tables in MySQL

SELECT product_name, customer.name, date_of_sale  
FROM sales, product, customer 
WHERE  product.product_id = sales.product_id 
AND customer.customer_id >= sales.customer_id LIMIT 0, 30
Comment

PREVIOUS NEXT
Code Example
Sql :: concat all rows in sql postgres 
Sql :: mysqli auto increment id 
Sql :: how to get column name in db from an sqlalchemy attribute model 
Sql :: tsql edit table column 
Sql :: get current date sql 
Sql :: fk in insert mysql 
Sql :: sql insert exemplo 
Sql :: mysql nested query 
Sql :: count weekend days between two dates sql 
Sql :: having in sql server 
Sql :: sql limit to 5 results 
Sql :: how to create triggers in sql server 
Sql :: postgresql delete cascade 
Sql :: sql select on string 
Sql :: how to delete last row in sql 
Sql :: sql numeric data type 
Sql :: peewee print sql 
Sql :: how to select from mssql 
Sql :: select year from dual oracle 
Sql :: calculer pourcentage mysql 
Sql :: postgres add prefix to primary key 
Sql :: selecting specific day in colum sql 
Sql :: do block in postgresql 
Sql :: mysql row generator 
Sql :: insert into table using openquery 
Sql :: mysql group rows with same value 
Sql :: mysql workbench change default value 
Sql :: psql: error: FATAL: database "odoo" does not exist 
Sql :: sql convert int to string 
Sql :: android sqlite get rows count 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =