Sql Tutorial Class


Delete record in sql

SQL DELETE Statement.



SQL DELETE statement is used to delete/remove record(s) from the table.



SQL DELETE Statement Syntax

DELETE table_name WHERE condition(s).


SQL DELETE statement example

Create table NewItems
(
ItemCode varchar(10)not null constraint pkItemCode primary key,
ItemName varchar(20)not null,
Price float not null,
Quantity float not null
)



Insert into NewItems Values('1','Apple Laptop','250','100')
Insert into NewItems Values('2','Apple Phone','300','30')
Insert into NewItems Values('3','Apple Pinter','300','50')
Insert into NewItems Values('4','Apple Server','1000','2')


Delete NewItems Where ItemCode='4'



DELETE all records from table

DELETE NewItems


SQL DELETE command example in video




SQL DELETE command example in video
delete record in sql

No comments:

Post a Comment