Basic Fundamentals
Date Functions
- CURDATE() – return current date
- CURRENT DATE() – return current date
- CURRENT TIME() – return current date
List of Database
SHOW DATABASES;
Current Database
SELECT DATABASE();
MySQL has six distinct table types.
- MYISAM
- MERGE
- ISAM
- HEAP
- INNODB
- BDB
Default type of MySQL is MYISAM.
Difference between MYISAM and InnoDB.
The main Difference is InnoDB support transactions. you can do commit and rollback in InnoDB where as in MYISAM doesn’t support transaction once issue command can’t rollback.
MYISAM does table locking where as InnoDB do row locking. if your App does lots of data modification then InnoDB is best and Faster.
Types of PL/SQL trigger
- Row level trigger
- Statement level trigger
1) Row level Trigger : An event is triggered for each row updated, inserted and deleted.
2) Statement level Trigger : An event is triggered for each SQL statement executed.
what is max length for dbname, tablename, and fieldname?
ans: 64
For value 0/1 which datatype is used ?
ans: tinyINT
Difference between two date ?
select DATEDIFF(NOW(), ’2006-07-01′);
Basic Fundamentals
Date Functions
- CURDATE() – return current date
- CURRENT DATE() – return current date
- CURRENT TIME() – return current date
List of Database
SHOW DATABASES;
Current Database
SELECT DATABASE();
MySQL has six distinct table types.
- MYISAM
- MERGE
- ISAM
- HEAP
- INNODB
- BDB
Default type of MySQL is MYISAM.
Difference between MYISAM and InnoDB.
The main Difference is InnoDB support transactions. you can do commit and rollback in InnoDB where as in MYISAM doesn’t support transaction once issue command can’t rollback.
MYISAM does table locking where as InnoDB do row locking. if your App does lots of data modification then InnoDB is best and Faster.
Types of PL/SQL trigger
- Row level trigger
- Statement level trigger
1) Row level Trigger : An event is triggered for each row updated, inserted and deleted.
2) Statement level Trigger : An event is triggered for each SQL statement executed.
what is max length for dbname, tablename, and fieldname?
ans: 64
For value 0/1 which datatype is used ?
ans: tinyINT
Difference between two date ?
select DATEDIFF(NOW(), ’2006-07-01′);