Friday, 29 January 2016

Finding character set of database or table or column in MYSQL

For Schemas:

SELECT default_character_set_name FROM information_schema.SCHEMATA
WHERE schema_name = "schemaname";

For Tables:

SELECT CCSA.character_set_name FROM information_schema.`TABLES` T,
       information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA
WHERE CCSA.collation_name = T.table_collation
  AND T.table_schema = "schemaname"
  AND T.table_name = "tablename";

For Columns:

SELECT character_set_name FROM information_schema.`COLUMNS`  
WHERE table_schema = "schemaname" 
 AND table_name = "tablename"  
AND column_name = "columnname";

Thursday, 7 January 2016

Struts - Package Order

Got it! The order matters.
Order in struts.xml matters:
  1. result-types?
  2. interceptors?
  3. default-interceptor-ref?
  4. default-action- ref?
  5. default-class-ref?
  6. global-results?
  7. global-exception-mappings?
  8. action*