Day-5-Mysql JDBC Mongdo
Day-5-Mysql JDBC Mongdo
Day 5:
--------
Intro to git and common commands
use ukgdemo;
desc emp;
desc table emp;
update
UPDATE emp SET Salary = Salary*1.03;
DELETE
DELETE FROM Emp WHERE Salary<10000;
ALTER TABLE:
ALTER TABLE Emp RENAME TO employe;
TRUNCATE Statement
--------------------
TRUNCATE Statement is also used to empty
the table completely.
TRUNCATE Emp1;
4. read / update/insert
Statement
|
PreParedStatement
|
CallableStatemetn
ResultSet rs=stmt.executeQuery()
executeQuery vs executeUpdate
r add/del/update
rs no of rows effected
Code
Factory dp
3 tier arch
Java + mongodb
-----------------------------
git
product table
id name price discount