Update command-
- To update the department & mobile no of suneel
Query-
update employee set Department= ‘IT’, salary= ‘15000’ where Emp_ID= 5775
update user_leave_balance set cl_balance= ’20’ where Emp_id=’005969′;
ORDER BY Query:
Query –
select Salary from employee order by Salary
select Emp_ID,FirstName,LastName,Department,Mobile_No,Salary,Address from employee order by Salary
Insert data into table-
Query-
insert into employee
( Emp_ID,FirstName,LastName,Department,Mobile_No,Salary,Address)
values(5776,’Zahid’,’Iqbal’,’Computer’,12345,11000,’Chandigarh’)
Import the data from excel
After inserting the data table is-
MySQL-data-types
MySQL supports a number of data types in several categories:
1. String (character and byte) types, and spatial types.
2. Date and time types
3. Numeric types
1. STRING DATA TYPES-
The following are the String Datatypes in MySQL:
2. NUMERIC DATATYPES-
The following are the Numeric Datatypes in MySQL:
3. DATE/TIME DATATYPES-
The following are the Date/Time Datatypes in MySQL: