Suscriber with us



Receive HTML?

Syndicate

php interview question part2 PDF Print E-mail

1.How do you prevent  mysql from caching a query?

SELECT SQL_NO_CACHE

include this (SQL_NO_CACHE) in select query while you retrieve the data from mysql

2.What happens when the column is set to AUTO INCREMENT and we reach the maximum value for that table?

It stops incrementing. It does not move to 0 to prevent data losses, but further inserts are going to produce an error

3.How would you select all the users, whose email address is null(empty)?

SELECT usrname FROM customers WHERE ISNULL(usremail);

4.Which clause is used to define the column which automatically increment with the row insertion?

1)AUTO_COLUMN
2)AUTO_NUMBER
3)AUTO_INCREMENT
4)AUTO_NEXT

Ans: (3) AUTO_INCREMENT

5.How to count no.of records in the table?

1)COUNT()
2)ROWS()
3)TOTAL()
4)None of the above

ANS: (1) COUNT()

6.Which clause is used to select the records in the reverse order?

1) ASEC
2) REVERSE
3) SORT with REVERSE
4) DESC with ORDER BY

Ans : (4) DESC with ORDER BY

7.Which clause is used to select unique records of the table?

1)DISTINCT
2)UNIQUE
3)ONLY
4)None of the above

ANS: (1)DISTINCT

8.What is foreign key?

a)Key taken from the other table.
b)Column can only contain the value which is present in its primary key.
c)Special key of the table to identify it.
d)None of the above.

Ans: (b)Column can only contain the value which is present in its primary key.

9.Which one of the following fields is the ideal candidate for the primary key in a user record table?

a) user_name
b) user_Address
c) System generated ID
d) user_Phone_number
e) user_email

10.What MySQL statement do you use to combine the results of multiple Mysql statements into one?

a) INNER JOIN statement
b) ALL statement
c) INTEGRATE clause
d) AGGREGATE clause
e) UNION clause

ANS: e) UNION clause





Digg!Del.icio.us!Google!Live!Facebook!Slashdot!Technorati!StumbleUpon!Newsvine!Yahoo!Free social bookmarking plugins and extensions for Joomla! websites!
Last Updated ( Thursday, 13 March 2008 )
 
Next >

Download Utility

XAMPP
WAMP
EditPlus
Zend Studio

Polls

Which is the best Scripting language?