Joining to different databases table

SELECT <...>
FROM A.table1 t1 JOIN B.table2 t2 ON t2.column2 = t1.column1;

Related Posts

  • 31
    Syntax: IF(expr,if_true_expr,if_false_expr) MySQL IF function is control flow functions that returns a value based on a condition. The IF function is sometimes referred to as IF ELSE or IF THEN ELSE function. If the expr evaluates to TRUE i.e., expr is not NULL and expr is not 0, the IF…
    Tags: table, select
  • 30
      To rename a table in MySQL you just need to run a command named RENAME TABLE, the syntax is very easy to use. RENAME TABLE table1 TO table2; The RENAME TABLE command will rename the table atomically, which means your table will be locked during the command. You can…
    Tags: table

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: