Mysql Questions..
1.An INNER JOIN does a full join, just like the first example, and the word OUTER may be added after the word LEFT or RIGHT.
2. What are the differences between drop a table and truncate a table?
Delete a Table or DatabaseTo delete a table (the table structure, attributes, and indexes will also be deleted).What if we only want to get rid of the data inside a table, and not the table itself? Use the TRUNCATE TABLE command (deletes only the data inside the table).
3.How can we repair a mysql table?
The syntex for repairing a mysql table is
REPAIR TABLENAME, [TABLENAME, ], [Quick],[Extended]
This command will repair the table specified
if the quick is given the mysql will do a repair of only the index tree if the extended is given it will create index row by row.
4.How can we find the number of rows in a table using mysql?
>SELECT COUNT(*) FROM table_name; but if u r particular about no of rows with some special result do this
>SELECT [colms],COUNT(*) FROM table_name [where u put conditions];
5.How many ways we can we find the current date using mysql?
SELECT CURDATE();
CURRENT_DATE() = CURDATE()
for time use
SELECT CURTIME();
CURRENT_TIME() = CURTIME()
No comments:
Post a Comment