Writing simple Queries in MySQL Workbench.
Hi guy, now I am presently learning SQL by using MySQL Workbench. So, I want to share my queries here.
So,in this MySQL Work bench I dump and execute SQL scripts from GitHub. So, I am using database name called employees. If there is so many databases then use I want to select databese by using following command. Here, I am not using keyword in uppercase because we know that MySQL Workbench accepts any case letters that means it is not a case sensitive.
use employees;
Next,I am viewed employess table by writing quey like as follows
select * from employees;
Next, I am inserting my details in the employees table. Here,I have written query like
insert into employees(emp_no,birth_date,first_name,last_name,gender,hire_date)
values (500000,'2000-03-03',"Pulakunta","Janani","F",'2023-11-25');
Then I have seen that the values are inserted or not. So,here I am filtering by using where clause. Then I have written query like as follows
select * from employees where first_name='Pulakunta';
This query only display where first_name is like Pulakunta.
Now, I am selecting all columns in descending order by showing 10 records only. so, I wrire quey like as follows
select * from employees
order by emp_no desc
limit 10;
Comments
Post a Comment