Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql select condition with left join

SELECT 
  person.name, job.name, job.status 'I want all people and display a job if it is current and not past'
FROM 
  person
LEFT JOIN 
   job ON person.id=job.personId AND job.status = 'current';
   
   'Will Display this'
   
Bob : Plumber : current
Jane : Driver : current
Mike : Cook : current
John : :  
Mary : : 
Comment

PREVIOUS NEXT
Code Example
Sql :: casterar postgres 
Sql :: pl sql revoke role from user 
Sql :: sql download for windows 11 
Sql :: setup mysql and wordpress on docker mac 
Sql :: psql list view rules 
Sql :: sql examples from framework 
Sql :: how to count codition 
Sql :: tipos da linguagem SQL 
Sql :: realtime database push multiple values 
Sql :: concat column value of same user in mysql 
Sql :: SQL Query Records Using Dates 
Sql :: mysqlimport: Error: 4166 
Sql :: hashpass 
Sql :: postgres multiple left join causing duplicates jsonb_agg 
Sql :: oracle create package specification 
Sql :: t-sql update table variale 
Sql :: row_number equivalent MS Access for sequential id By Group (2) 
Sql :: postgresql insert string 
Sql :: psql limit order group by 
Sql :: sql delete all except 
Sql :: Getting error while running 50 MB script on SQL Server 
Sql :: sütun güncelleme SQL 
Sql :: error infor in sql server 
Sql :: sql count return 0 if no rows 
Sql :: populate sql table with random data 
Sql :: mysql export data with a where clause 
Sql :: how to add session data into mysql database from button 
Sql :: kannst du deine finger trainieren 
Sql :: oracle tablespace owners 
Sql :: How should I pass a table name into a stored proc? 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =