Home » » MYSQL-UNION

MYSQL-UNION

Written By 1 on Friday, October 19, 2012 | 10:16 AM

It is used to combine two or more sql statements.
Understand following points while using union

  • Number of cols in each sql must be same
  • Columns data type must be same at least its easy to convert them into same (eg varchar, text)
  • When cols name is different, then label of first sql is print.
  • You can use order by statement after at last of the last sql statements


0 Comment:

Post a Comment