Cloud Crystal for the day – 5th January 2021
Cloud Crystal for the day – 4th January 2021
Cloud Crystal for the day – 3rd January 2021
Happy New Year 2021
Wishing everyone a happy new year 2021.
Total number of visits in 2020 was 31,590.
Total Hits in 2020 was 3,04,982.
Total number of unique visitors was 17,540.
Please find below the statistics for December 2020.
Thank you all for visiting the website.
Health tip for the day – 9th December 2020
You are as young as your spinal cord.
Quote for the day – 9th December 2020
A hot cup of coffee on a winter morning, watching birds fly by above the balcony is such a delight.
Statistics for November 2020 – MOHANMA.COM
Stats for November 2020
Unique visitors for MOHANMA.COM in November 2020 is 1163.
Number of visits between November 1 to November 30 is 2225.
November 20th 2020 clocked the highest number of hits in a day for November 2020 – 1621.
Average visits received per day for November 2020 is 74.
Thank you all for visiting the website.
Primary and Foreign Key in SQL
Syntax to set EMPLOYEE_ID as primary key in employee table.
ALTER TABLE EMPLOYEE add CONSTRAINT EMPLOYEE_PK PRIMARY KEY(EMPLOYEE_ID)
Syntax to set 2 fields(EMPLOYEE_ID, FIRST_NAME) as primary key in employee table.
ALTER TABLE EMPLOYEE add CONSTRAINT EMPLOYEE_PK PRIMARY KEY(EMPLOYEE_ID, FIRST_NAME)
Syntax to drop primary key on employee table.
ALTER TABLE EMPLOYEE drop CONSTRAINT EMPLOYEE_PK
Syntax to create EMPLOYEE_REF_ID in INCENTIVES table as foreign key with respect to EMPLOYEE_ID in employee table.
ALTER TABLE INCENTIVES ADD CONSTRAINT INCENTIVES_FK FOREIGN KEY(EMPLOYEE_REF_ID) REFERENCES EMPLOYEE(EMPLOYEE_ID)
Syntax to drop foreign key on employee table.
ALTER TABLE INCENTIVES drop CONSTRAINT INCENTIVES_FK
Top N Salary – SQL
Query to select TOP 2 salary from employee table.
select * from employee order by salary desc limit 2
Query to select TOP N salary from employee table.
select * from employee order by salary desc limit N
Query to select 2nd Highest salary from employee table.
select min(SALARY) from (select * from employee order by salary desc limit 2) a
Query to select Nth Highest salary from employee table.
select min(SALARY) from (select * from employee order by salary desc limit N) a
Query to select First_Name, Last_Name from employee table as separate rows.
select FIRST_NAME from EMPLOYEE union select LAST_NAME from EMPLOYEE