adspace
Answer Posted / Km.priti
To use CASE expressions in MySQL, you can write a conditional statement that evaluates multiple conditions and returns different results for each condition. Here's an example:n`nSELECT COLUMN_NAME,ntCASEntWHEN data_type = 'int' THEN 'integer'ntWHEN data_type = 'varchar' THEN 'string'ntELSE 'other type'ntEND AS DataType FROM information_schema.columns WHERE table_name='YourTable';n`
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers