Answers for "select multiple columns mysql"

SQL
1

how to select multiple columns from different tables in mysql

-- MySQL 
-- t1 = table1
-- dt2 = column of table
SELECT t1.dt2, t2.dt4, t2.dt5, t2.dt3 #get dt3 data from table2
FROM table1 t1, table2 t2 -- Doesn't need to have t1, or t2
WHERE t1.dt2 = 'asd' AND t2.dt4 = 'qax' AND t2.dt5 = 456
Posted by: Guest on July-22-2020
-1

mysql select all columns and specific fields as

SELECT mytable.*, column20 AS Customer, column11 FROM mytable
-- OR
SELECT column11, column20 AS Customer, mytable.* FROM mytable
Posted by: Guest on May-20-2020

Code answers related to "select multiple columns mysql"

Code answers related to "SQL"

Browse Popular Code Answers by Language