Thursday, 16 July 2015

Practice Question 2 MySQL Functions

Practice Question 2 (Understanding the use of   DML command with   MySQL functions.)
Open MySQL and load MYORG database. Write and Execute the SQL command for the following and also write the steps/commands in your Practical notebook
.

1   Write commands to display the system date.
2   Write a command to display the name of current month.
3   Write command to print the day of the week of your birthday in the year 2015.
4   Write a query to display employee names in lower case from Emp table.
5   Write a query to display last 3 characters from all the names of
employee from Emp table.
6   Write a query to display ename alone with the position of ‘N’ character in ename column from Emp table.
7   Write a query to display ename and two characters from 2nd position in job column from Emp table.
8   Write a query to display ename and weekday on which they joined from Emp table.
9   Write a query to display ename alon with number of years(experience) as on today from Emp table.
10   Write a query to display ename, Job and Date of retirement (60 years after Hiredate) from Emp table.
11   Write a query to find out the result of 63.
12   Write a query to find out the result of 301/2 (Square root of 30)
13   Write the command to display the ename and its length from Emp table.
14   Write the command to round off value 15.193 to nearest ten’s i.e. 20.
15   Write a query to display ename concatenated by job from Emp table.


No comments:

Post a Comment