Mysql Interview Question and Answers
26. |
What is the difference between BLOB AND TEXT? |
|
A BLOB is a binary large object that can hold a variable amount of data. The four BLOB types TINYBLOB, BLOB, MEDIUMBLOB, and LONGBLOB differ only in the maximum length of the values they can hold. The four TEXT types TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT correspond to the four BLOB types and have the same maximum lengths and storage requirements. The only difference between BLOB and TEXT types is that sorting and comparison is performed in case-sensitive fashion for BLOB values and case-insensitive fashion for TEXT values. In other words, a TEXT is a case-insensitive BLOB. |
27. |
How we get Sum of column? |
|
mysql> SELECT * FROM tablename; |
28. |
How do you get current user in mysql? |
|
SELECT USER(); |
29. |
How would you change a table to InnoDB? |
|
ALTER TABLE name_file ENGINE innodb; |
30. |
How do you concatenate strings in MySQL? |
|
CONCAT (string1, string2, string3) |