SQL
SQL
2)alter table ch add value decimal;= update ch set no="1" where value="200";
3)
aggrigate functions
1) count ;
select max(ssalary) as mimimummarks from hero; to show the title column name which we have to
specify asa minimiumvalue
2) sum;
3) min;
4)max;
5) avg;
SQL----
sql clauses;
1) where clause
select * from villian where amount='20000';
2) distinct
3) from
4) order by
5) group by
6)having ;
The following SQL statement lists the number of customers in each country.
Only include countries with more than 5 customers:
SELECT COUNT(CustomerID), Country
FROM Customers
GROUP BY Country
LIKE: 26-7-2024
1) FIRST LETTER:
If % is attached with the some of the letters in the name it will execute full as=”%chi”:chintu
a)Select * from grees2 where sname like “c____u”;
29-7-24
Any: any operator works like comparing the value of table to each valiue in the result table
JOINS
INNER JOIN:
INNER join used to return onley those resilts from the table thst matches the specified condition and
hide other row and colomn
>select * from staff left outer join student on staff.age=student.age union select * from staff right
outer join student on staff.age=student.age;
CHECK ( ) :
Ex:
DEAFULT:
Ex:
Union :
SYN ;
2)union all:
SYN:
select sname from student union all select sname from staff;
3)intersect :
SYN :
2) Domain integrity : it enforce valied entries for a given column by restrating the type, the
11) LOG 10 :
10)LOG 2 :