Sybase DML Statements

Sybase DML Statements: Data Manipulation Language(DML) commands are used to modify the data from database objects.

  • INSERT
  • UPDATE
  • DELETE

INSERT statement: Insert is used to insert(add) the data to table. User must be granted the insert permission on the table.

Syntax:

insert into table_name values(value1, value2, ….)
go

Examples:

insert into accounts values(10001, ‘Kalpesh’, ‘S’)
go
insert into accounts values(10002, ‘Michael’, ‘C’)
go

UPDATE statement: Update statement is used to modify the data in a table. User must have update permission on the table.

Syntax:
UPDATE table_name set column_name=new value

Examples:

UPDATE pinnapa set tech=’Python’
where author_name=’Bali’

DELETE statement: Delete statement is used to remove the rows based on condition. User must have the delete permission on the table.

Syntax:
Delete from table where condition

Examples:

delete from pinnapa where tech=’Python’
delete from pinnapa

Powered by k2schools