Thursday, April 20, 2017

MySQL Interview Questions And Answers For Fresher

MySQL Tutorial


1. What is MySQL?
MySQL is an Open Resource WMA which was created, backed and promoted by MySQL AB (now acquired by Oracle)
MySQL Descriptive Questions And Answer
2. What are the technical features of MySQL?
• MySQL database software which includes a client or server system
• Multithreaded SQL Server supports various client programs and libraries
• Different Backend
• A wide range of application programming interfaces and
• Administrative tools


3. Why MySQL is used?
MySQL database server is dependable, speedy and simple to use. This software is downloaded as freeware and can be downloaded from the Internet.


4. What are Heap tables?
Heap tables are in memory and temporarily high-speed storage is used
On the basis.
• Blob or text field is not allowed
• Comparison operators can be used only =, <,>, =>, = <
• AUTO_INCREMENT is not supported by the HEAP table
• Indexes should not be the pipe

5. How many columns have for creating Index?
 Maximum of 16 indexed columns have for any standard table.


6. What is the dissimilar between NOW () and CURRENT_DATE ()?
NOW () method used to show current year, month, a date with hours, minutes and seconds.
CURRENT_DATE () method used to show current year, month and date only.


7. What are the objects can be formed using CREATE statement?
Following objects are formed using CREATE statement:
·         DATABASE
·         EVENT
·         FUNCTION
·         INDEX
·         PROCEDURE
·         TABLE
·         TRIGGER
·         USER
·         VIEW



8. How many TRIGGERS are permitted in MySql table?
SIX triggers are permitted in MySql table. They are as follows:
·         BEFORE INSERT
·         AFTER INSERT
·         BEFORE UPDATE
·         AFTER UPDATE
·         BEFORE DELETE and
·         AFTER DELETE


9. What are the substandard string types?
Following are substandard string types:
·         TINYTEXT
·         TEXT
·         MEDIUMTEXT
·         LONGTEXT


10. What is every the Common SQL Function?
CONCAT (A, B) - Combines two string values to create a string output. Use often to combine one or more fields into a single field.
FORMAT(X, D) – Formats the number X to D significant digits.
CURRDATE (), CURRTIME () – proceeds the current date or time.
NOW () – proceed the current date and time as one value.
MONTH (), DAY (), YEAR (), WEEK (), WEEKDAY () – Extracts the specified data from a date value.
HOUR (), MINUTE (), SECOND () – Extracts the specified data from a time value.
DATEDIFF (A, B) – Determines the difference between two dates and it is commonly used to calculate the age
SUBTIMES (A, B) – Determines the dissimilarity between two times.
FROM DAYS (INT) – Converts an integer number of days into a date value.


11. clarify Access Control Lists.
An ACL (Access Control List) is a list of permissions related to an object. This list is based on the security model of MySQL server and it helps troubleshooting issues that users can not connect to
MySQL puts ACLs to try to prove a user or run a command, while MySQL tests authentication information and permissions against ACLs, in a precursor order.


12.  What is the compensation of MySQL when compared with Oracle?
MySQL open-source software, which is available at any time, and there is no cost involved.
·         MySQL is portable
·         GUI with command prompt
·         Administration is supported using MySQL Query Browser


13. What is the difference between FLOAT and DOUBLE?
Following are the difference between FLOAT and DOUBLE:
• Floating point numbers are stored in FLOAT with eight place accuracy and it has four bytes.
• Floating point numbers are stored in DOUBLE with an accuracy of 18 places and it has eight bytes.

 14. What is the difference CHAR_LENGTH and LENGTH?
CHAR_LENGTH is character calculate while the LENGTH is byte count. The information is matching for Latin characters but they are different for Unicode and other encodings.

15. How to symbolize ENUMs and SETs internally?
ENUMs and SETs are used to symbolize powers of two because of storage optimizations.

16. What is the difference CHAR and VARCHAR?
Following are the differences between CHAR and VARCHAR:
·         CHAR and VARCHAR types differ in storage and retrieval
·         CHAR column length is fixed to the length that is declared while creating a table. The length value ranges from 1 and 255
·         When CHAR values are stored when they are exact padded using places to definite length. Rambling spaces are disinterested when CHAR values are retrieved.


17. Give string types available for the column?
The string types are:
·         SET
·         BLOB
·         ENUM
·         CHAR
·         TEXT
·         VARCHAR


18. What storage engines are used in MySQL?
Storage engines are called table types and data is stored in files using various techniques.
·         Technique involves:
·         Storage mechanism
·         Locking levels
·         Indexing
·         Capabilities and functions


19. What are the drivers in MySQL?
Following are the drivers available in MySQL:
·         PHP Driver
·         JDBC Driver
·         ODBC Driver
·         C WRAPPER
·         Python Driver
·         PERL Driver
·         RUBY Driver
·         CAP11PHP Driver
·         Ado.net5.mxj


20. Why use MySQL?
MySQL Database Server, dependable, fast and extremely easy to use. This software can be downloaded as freeware and can be downloaded from the Internet.


21. What is the default port for MySQL server?
3306 is the default port for MySQL server.


22. What are MySQL tables in the heap?
- In-memory heap table. They are typically used for high-speed temporary storage. No writing is allowed or Blob fields in piles on the table. You can only use the comparison operators = and <=>. Heap tables do not support AUTO_INCREMENT. Not the index must be zero.


23. How do you control the maximum size of a heap table?
MySQL Config  variable max_heap_table_size.


24. What is the CSV table?
- That particular table, the data for which is stored in comma-separated values file. They cannot be indexed.


25. Explain federated table.
- Introduced in MySQL 5.0, federated tables allow other servers to access the other databases on the table.


26. What is the MySQL data type of cereal?
- BIGINT AUTO_INCREMENT primary key null


27. What happens when auto-increment columns in the table are set and you reach the maximum value?
- it stops incrementing. It does not overflow 0 data loss prevention, but even more, pressing since the key has already been used, that is going to generate an error.


28. but you really timestamp data as of the date of publication of this article, if you want to save?
- Create two columns of type TIMESTAMP and the second to use your real data.
TIMESTAMP data type 25.Explain update CURRENT_TIMESTAMP default CURRENT_TIMESTAMP
- Timestamp column to another column in a table with a timestamp column as a single exhibits the same behavior.


29. What updates CURRENT_TIMESTAMP data type TIMESTAMP in the works?
- Starting with an empty place in the column, the current value of the timestamp in the future updates.


30. Explain TIMESTAMP default '2006: 09: 02 17:38:44' update CURRENT_TIMESTAMP ON
- On starting a default value is used, a current timestamp update row is inserted.


31.If I data type VARCHAR (3) to create a column, I would expect to see in MySQL tables?
- CHAR (3) the MySQL data type is automatically adjusted.


No comments:

Post a Comment