How to search for a specific column name in all the tables in MySQL Workbench
explains what are different ways you can find out if the column exists in database or not for a table. You can query information_schema or you can use schema inspector to find out the column if it exits or does not exists in MySQL Server.
Query you can use to find out if column exists
SELECTtable_name,column_name,data_type,ordinal_positionFROM INFORMATION_SCHEMA.COLUMNSWHERE table_schema = 'schema_name'AND column_name = 'Column_name' ;
MySQL Workbench Tutorial - How to check if column exists in MySQL Database
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.