Sql basic command 2

we work on the second sql basic command

Delete the table

DELETED FROM
WHERE {Comparision} ORDER BY LIMIT 1;
example-
DELETD FROM Names Where name Like %a& ORDER BY DESC LIMIT 1;

Update the table

UPDATE

SET = value 1 WH…


This content originally appeared on DEV Community and was authored by Sachin

we work on the second sql basic command

Delete the table

DELETED FROM

WHERE {Comparision} ORDER BY LIMIT 1;
example-
DELETD FROM Names Where name Like %a& ORDER BY DESC LIMIT 1;

Update the table

UPDATE

SET = value 1 WHERE {Condition};

Changed the Structure the table and add column and before and after col

ALTER TABLE

CHANGED [new constrains (datatype,constraits)]
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;



This content originally appeared on DEV Community and was authored by Sachin


Print Share Comment Cite Upload Translate Updates
APA

Sachin | Sciencx (2025-01-21T03:54:38+00:00) Sql basic command 2. Retrieved from https://www.scien.cx/2025/01/21/sql-basic-command-2/

MLA
" » Sql basic command 2." Sachin | Sciencx - Tuesday January 21, 2025, https://www.scien.cx/2025/01/21/sql-basic-command-2/
HARVARD
Sachin | Sciencx Tuesday January 21, 2025 » Sql basic command 2., viewed ,<https://www.scien.cx/2025/01/21/sql-basic-command-2/>
VANCOUVER
Sachin | Sciencx - » Sql basic command 2. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/01/21/sql-basic-command-2/
CHICAGO
" » Sql basic command 2." Sachin | Sciencx - Accessed . https://www.scien.cx/2025/01/21/sql-basic-command-2/
IEEE
" » Sql basic command 2." Sachin | Sciencx [Online]. Available: https://www.scien.cx/2025/01/21/sql-basic-command-2/. [Accessed: ]
rf:citation
» Sql basic command 2 | Sachin | Sciencx | https://www.scien.cx/2025/01/21/sql-basic-command-2/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.