Random Testing Flashcards
How many TRIGGERS are allowed in MySql table?
BEFORE INSERT AFTER INSERT BEFORE UPDATE AFTER UPDATE BEFORE DELETE and AFTER DELETE
What does a TIMESTAMP do on UPDATE CURRENT_TIMESTAMP data type?
TIMESTAMP column is updated with Zero when the table is created. UPDATE CURRENT_TIMESTAMP modifier updates the timestamp field to the current time whenever there is a change in other fields of the table.
What is InnoDB?
lnnoDB is a transaction safe storage engine developed by Innobase Oy which is a Oracle Corporation now.
What are federated tables?
Federated tables which allow access to the tables located on other databases on other servers.
What are the column comparisons operators?
The = , <>, <=, =, >,<>, <=>, AND, OR, or LIKE operators are used in column comparisons in SELECT statements.
How do you control the max size of a HEAP table?
Maximum size of Heal table can be controlled by MySQL config variable called max_heap_table_size.
What is the difference between mysql_fetch_array and mysql_fetch_object?
Following are the differences between mysql_fetch_array and mysql_fetch_object: mysql_fetch_array() -Returns a result row as an associated array or a regular array from database. mysql_fetch_object – Returns a result row as object from database.
What are all the Common SQL Function?
CONCAT(A, B) – Concatenates two string values to create a single string output. Often used to combine two or more fields into one single field. FORMAT(X, D) – Formats the number X to D significant digits. CURRDATE(), CURRTIME() – Returns the current date or time. NOW() – Returns the current date and time as one value. MONTH(), DAY(), YEAR(), WEEK(), WEEKDAY() – Extracts the given data from a date value. HOUR(), MINUTE(), SECOND() – Extracts the given data from a time value. DATEDIFF(A, B) – Determines the difference between two dates and it is commonly used to calculate age SUBTIMES(A, B) – Determines the difference between two times. FROMDAYS(INT) – Converts an integer number of days into a date value.
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.
What is ISAM?
ISAM is abbreviated as Indexed Sequential Access Method.It was developed by IBM to store and retrieve data on secondary storage systems like tapes.
What is the difference between BLOB AND TEXT?
The only difference between BLOB and TEXT types is that sorting and comparison is performed in case-sensitive for BLOB values and case-insensitive for TEXT values.
How many columns can be used for creating Index?
Maximum of 16 indexed columns can be created for any standard table.
What are the different tables present in MySQL?
MyISAM Heap Merge INNO DB ISAM
What is the default port for MySQL Server?
The default port for MySQL Server is 3306. Another standard default is port 1433 in TCP/IP for SQL Server.
How to display top 50 rows?
SELECT * FROM LIMIT 0,50;