Pacecode Blog Tips, Scripts and More…

25Dec/083

Important MySQL Questions and Answers

How many types of join are supported by mysql? Which are they? Explain:

ans: there are three types of joins supported in mysql as inner, right and left.
The inner join displays all the rows from both tables where match is found.
Left join returns all the rows from first table even if the match is not found in second table.
While the right join returns all the rows from second table even if match is not found in first table.

What are the advantages of mysql comparing with oracle?

MySql has many advantages in comparison to Oracle.

1 - MySql is Open source, which can be available any time

2 - MySql has no cost of development purpose.

3 - MySql has most of features , which oracle provides

4 - MySql day by day updating with new facilities.

5 - Good for small application.

6 - easy to learn and to become master.

7 - MySql has a good power these days.

even though MySql having so many advantages, Oracle is best database ever in Software development.

What are the limitations of mysql in Comparison of Oracle?

  • Mysql supports six different types of tables, four of which do not support transactions (MyISAM, MERGE, ISAM, and HEAP)
  • MySQL only supports one index type
  • Unlike Oracle, MySQL date data types can store invalid dates, do not support time zones, and the precision of time values is limited to one second.

How many drivers in MYSQL?

There are eleven drivers in MYSQL .Six of them from MySQL AB and five by MYSQL Communities. They are1.PHP Driver2.ODBC Driver3.JDBC Driver4.ado.net5.mxj6.CAPI1PHP DRIVER2.PERL DRIVER3.PYTHON DRIVER4.RUBY DRIVER5.C++ WRAPPER

How are triggers created in MySQL?

CREATE TRIGGER `tgr_name` AFTER UPDATE ON `addresses` FOR EACH ROW begin

update products set countryName = new.countryName where products.shippingAddressId = old.id;

end;