The largest Interview Solution Library on the web


Interview Questions
« Previous | 0 | 1 | 2 | 3 | 4 | Next »

21.What is command to display all databases?

SHOW DATABASES;

22.What is command to display current Date and Time ?

SELECT NOW();

23.What are the objects you can use with CREATE statement?

  • DATABASE
  • TABLE
  • TRIGGER
  • USER
  • VIEW
  • EVENT
  • FUNCTION
  • INDEX
  • PROCEDURE.

24.What are the nonstandard string types?

TINYTEXT, TEXT, MEDIUMTEXT and LONGTEXT

25. What is SQLyog?

The SQLyog program is Software which provide GUI tool for MySQL.

26.What are string datatype in MySQL?

  • CHAR
  • VARCHAR
  • TINY TEXT
  • TEXT
  • MEDIUM TEXT
  • LONG TEXT
  • BINARY
  • VARBINARY
  • TINYBLOB
  • MEDIUMBLOG
  • BLOB
  • LONGBLOB
  • ENUM
  • SET

27.How to get the next auto-increment id in mysql?

Use LAST_INSERT_ID() from your MySQL query.

28.What is MySQL?

MySQL is a multithreaded, multi-user SQL database management system which has more than 11 million installations. This is the world's second most popular and widely used open source database.

29.In which language MySQL is written?

MySQL is written in C and C++ and its SQL parser is written in yacc.

30.What are the technical specification of MySQL?

MySQL has the following technical specifications -

  • Flexible structure
  • High performance
  • Manageable and easy to use
  • Replication and high availability
  • Security and storage management

31.How many Triggers are possible in MySQL?

There are only six Triggers allowed to use in MySQL database.

  • Before Insert
  • After Insert
  • Before Update
  • After Update
  • Before Delete
  • After Delete

32.What is heap table?

Tables that are present in memory is known as HEAP tables. When you create a heap table in MySQL, you should need to specify the TYPE as HEAP. These tables are commonly known as memory tables. They are used for high speed storage on temporary basis. They do not allow BLOB or TEXT fields.

33.What is BLOB and TEXT in MySQL?

BLOB is an acronym stands for binary large object. It is used to hold a variable amount of data.
There are four types of BLOB.

  • TINYBLOB
  • BLOB
  • MEDIUMBLOB
  • LONGBLOB

  • The differences among all these are the maximum length of values they can hold.
    TEXT is case-insensitive BLOB. TEXT values are non-binary strings (character string). They have a character set and values are stored and compared based on the collation of the character set.
    There are four types of TEXT.
  • TINYTEXT
  • TEXT
  • MEDIUMTEXT
  • LONGTEXT

34.What is the difference between heap table and temporary table?

Heap tables:
Heap tables are found in memory. They are used for high speed storage on temporary basis. They do not allow BLOB or TEXT fields.
Heap tables do not support AUTO_INCREMENT.
Indexes should be NOT NULL.
Temporary tables:
The temporary tables are used to keep the temporary data. Sometimes it is very useful in cases to keep temporary data. Temporary table is deleted after current client session terminates.
Main differences:
The heap tables are shared among clients while temporary tables are not shared.
Heap tables are just another storage engine, while for temporary tables you need a special privilege (create temporary table).

35.What is the difference between FLOAT and DOUBLE?

FLOAT stores floating point numbers with accuracy up to 8 places and allocates 4 bytes, on the other hand DOUBLE stores floating point numbers with accuracy up to 18 places and allocates 8 bytes.

36.What are the advantages of MySQL in comparison to Oracle?

  • MySQL is a free, fast, reliable, open source relational database while Oracle is expensive, although they have provided Oracle free edition to attract MySQL users.
  • MySQL uses only just under 1 MB of RAM on your laptop while Oracle 9i installation uses 128 MB.
  • MySQL is great for database enabled websites while Oracle is made for enterprises.
  • MySQL is portable.

37.What are the disadvantages of MySQL?

  • MySQL is not so efficient for large scale databases.
  • t does not support COMMIT and STORED PROCEDURES functions version less than 5.0.
  • Transactions are not handled very efficiently.
  • 38.What is the difference between CHAR and VARCHAR?

    • CHAR and VARCHAR are differ in storage and retrieval.
    • CHAR column length is fixed while VARCHAR length is variable.
    • The maximum no. of character CHAR data type can hold is 255 character while VARCHAR can hold up to 4000 character.
    • CHAR is 50% faster than VARCHAR.
    • CHAR uses static memory allocation while VARCHAR uses dynamic memory allocation.

    39.What is the difference between MySQL_connect and MySQL_pconnect?

    Mysql_connect:

    • It opens a new connection to the database.
    • Every time you need to open and close database connection, depending on the request.
    • Opens page every time when it loaded.
    • Mysql_pconnect:
    • In Mysql_pconnect, "p" stands for persistent connection so it opens the persistent connection.
    • the database connection can not be closed.
    • it is more useful if your site has more traffic because there is no need to open and close connection frequently and every time when page is loaded.

    40.What does " i_am_a_dummy flag" do in MySQL?

    The " i_am_a_dummy flag" enables MySQL engine to refuse any UPDATE or DELETE statement to execute if the WHERE clause is not present.

    « Previous | 0 | 1 | 2 | 3 | 4 | Next »


    copyright © 2014 - all rights riserved by javatechnologycenter.com