we work on the second sql basic command
Delete the table
DELETED FROM
example-
DELETD FROM Names Where name Like %a& ORDER BY DESC LIMIT 1;
Update the table
UPDATE
Changed the Structure the table and add column and before and after col
ALTER TABLE
example - ALTER TABLE Actor ADD Region VARCHAR(10) DEFAULT "Bollywood";
example 2
ALTER TABLE Actors ADD Middlename VARCHAR(10) AFTER FirstName;
exaple 3
ALTER TABLE Actors DROP Middlename;
AS
we discuss the AS IN Sql to used the own name in the column
SELECT DOB AS "Date of Birth" From Actors;
CONCAT
we can merged the Fistname and Lastname
SELECT CONCAT(Fistname,'',Lastname) AS Name FROM Actors;
DISTICT
FIND THE UNIQUE NOT REPEAT
SELECT DISTINCT Score FROM student2;
COUNT
SELECT COUNT(*) As "No of student" From Student2 Where Maritial_Status = "Single"
SUM
SELECT SUM(Score) From Student;
Top comments (0)