0% found this document useful (0 votes)
41 views

Queries: Ques 1. Mysql Select Ename, Sal, Dept - No From Empl Where Commission Is Null

This document contains 5 SQL queries that select data from an "empl" table based on various conditions, and 5 additional questions about string functions in MySQL. The queries select employee names, salaries, and department numbers based on whether their commission is null or not null, salaries between 1000-2500, and names like "a%". The additional questions use string functions like LEFT, RIGHT, MID, LTRIM to extract or modify substrings from given strings.

Uploaded by

Deepak Baliyan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views

Queries: Ques 1. Mysql Select Ename, Sal, Dept - No From Empl Where Commission Is Null

This document contains 5 SQL queries that select data from an "empl" table based on various conditions, and 5 additional questions about string functions in MySQL. The queries select employee names, salaries, and department numbers based on whether their commission is null or not null, salaries between 1000-2500, and names like "a%". The additional questions use string functions like LEFT, RIGHT, MID, LTRIM to extract or modify substrings from given strings.

Uploaded by

Deepak Baliyan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

QUERIES

Ques 1. mysql> select ename ,sal, dept_no


from empl where commission is null ;
Ques 2. mysql> select ename ,sal,dept_no from empl
where commission is not null;
Ques 3. mysql> select * from empl where sal
between 1000 and 2500;
Ques 4. mysql> select ename from empl where
ename like ‘a%’ ;
Ques 5 . mysql> select concat (ename,dept_no)as
“name dept” from empl;
OUTPUT QUESTIONS
Ques 1 . mysql> select left(‘Informatices practices’,5) ;
Ques 2 . mysql> select right (‘Informatices practices’,5);
Ques 3 . mysql> select mid(‘Informatices practices’,6,9);
Ques 4 . mysql> select ltrim(‘akshit’);
Ques 5 . mysql>

You might also like