Important conditions for joining two tables on a key?
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
It will take less than 1 minute to register for lifetime. Bonus Tip - We don't send OTP to your email id Make Sure to use your own email id for free books and giveaways
Answers ( 4 )
1) The data types of the columns involved in a join condition need to be compatible.
2) A join condition involves columns that relate two tables in some logical way.
3) The columns specified in a join condition need to be specified in the SELECT statement with table alias.
Primary conditions for joining two tables on keys:
1. The key column should contain non-NULL values
2. The datatype of both tables’s column should be similar
Important conditions for joining 2 tables on a particular key :
1. The data type has to be similar with respect to table columns.
2. We need to use different Aliases for the columns with respect to the table name given in the select statement.
Before joining two tables points to remember-
There should be no null values to avoid error.
Data type of columns should be similar.