.
Divya
SELECT column_name,column_name
FROM table_name
WHERE NOT condition;
<?php
$servername='localhost';
$username='root';
$password='';
$dbname = "my_db";
$conn=mysqli_connect($servername,$username,$password,"$dbname");
$result = mysqli_query($conn,"SELECT * FROM students where NOT First_name='Divya' ");
?>
<!DOCTYPE html>
<html>
<head>
<title> Retrive data</title>
</head>
<body>
<table>
<tr>
<td>id</td>
<td>First Name</td>
<td>Last Name</td>
<td>City</td>
<td>Email id</td>
</tr>
<?php
$i=0;
while($DB_ROW = mysqli_fetch_array($result)) {
?>
<tr class="<?php if(isset($classname)) echo $classname;?>">
<td><?php echo $DB_ROW["id"]; ?></td>
<td><?php echo $DB_ROW["First_name"]; ?></td>
<td><?php echo $DB_ROW["Last_name"]; ?></td>
<td><?php echo $DB_ROW["City_name"]; ?></td>
<td><?php echo $DB_ROW["Email"]; ?></td>
</tr>
<?php
$i++;
}
?>
</table>
</body>
</html>
DELETE column_name,column_name
FROM table_name
WHERE NOT condition;
<?php
$servername='localhost';
$username='root';
$password='';
$dbname = "my_db";
$conn=mysqli_connect($servername,$username,$password,"$dbname");
$result = mysqli_query($conn,"DELETE * FROM students where NOT Id=2 ");
?>
UPDATE table_name
SET column1=value1,column2=value2,...
WHERE NOT condition;
<?php
$servername='localhost';
$username='root';
$password='';
$dbname = "my_db";
$conn=mysqli_connect($servername,$username,$password,"$dbname");
$result = mysqli_query($conn,"UPDATE students set City='Mumbai' where NOT Id=2 ");
?>
.