UPDATE: Using this command we can modify all the records & also we can modify specific records in the table using where clause.Using this command we can modify data in the table.
Syntax:Update Table_name set column_name=value;
Example:Update emp set sal= 1000 where ename='clark';
Syntax to modify more than one column:
Update table_name set column1=value,column2=value,...cloumnn=value;
Example:Update emp set sal=2000,ename='james where empno=7788;
DELETE:This command is used to delete the records from the table.Using this command we can delete all the records and also we can delete specific records in the table (using where clause).
Syntax:Delete from Table_name; --for all records
Example:Delete from emp;
Syntax to delete a specific record using where clause:
Delete from Table_name where column_name=value;
Example:Delete from emp where ename='clark';
Syntax:Update Table_name set column_name=value;
Example:Update emp set sal= 1000 where ename='clark';
Syntax to modify more than one column:
Update table_name set column1=value,column2=value,...cloumnn=value;
Example:Update emp set sal=2000,ename='james where empno=7788;
DELETE:This command is used to delete the records from the table.Using this command we can delete all the records and also we can delete specific records in the table (using where clause).
Syntax:Delete from Table_name; --for all records
Example:Delete from emp;
Syntax to delete a specific record using where clause:
Delete from Table_name where column_name=value;
Example:Delete from emp where ename='clark';
No comments:
Post a Comment
If you Like my blog Spread it and help friends for whom this blog is useful for their career.