MySQL

  • How to find FK constraints rule in any schema in MySQL ?

    constraints rule can be ‘RESTRICT’ OR ‘SET NULL’ OR ‘CASCADE’ SELECT distinct table_name FROM information_schema .referential_constraints WHERE constraint_schema = ‘<DB… Read More

  • ACID Properties

    ACID Properties ACID properties are an important concept for databases or data sharing techniques. The acronym stands for Atomicity, Consistency,… Read More

  • How to compare 2 table structure in MySQL

    Scenario 1: Following query displays whether the differences exists or not. SELECT IF(COUNT(1)>0,’Differences’,’No Differences’) Comparison FROM ( SELECT column_name,ordinal_position, data_type,column_type,COUNT(1)… Read More

  • How to move a column to first in mysql ?

    Use the following query: ALTER TABLE table_name CHANGE COLUMN column_name column_name INTEGER NOT NULL AUTO_INCREMENT FIRST;   INTEGER NOT NULL AUTO_INCREMENT… Read More