Advertisements
Advertisements
प्रश्न
Write suitable SQL query for the following:
Display the remainder of 100 divided by 9.
उत्तर
select mod(100,9);
APPEARS IN
संबंधित प्रश्न
Consider the table STUDENT given below:
RollNo | Name | Class | DOB | Gender | City | Marks |
1 | Anand | XI | 6/6/97 | M | Agra | 430 |
2 | Chetan | XII | 7/5/94 | M | Mumbai | 460 |
3 | Geet | XI | 6/5/97 | F | Agra | 470 |
4 | Preeti | XII | 8/8/95 | F | Mumbai | 492 |
5 | Saniyal | XII | 8/10/95 | M | Delhi | 360 |
6 | Maakhiy | XI | 12/12/94 | F | Dubai | 256 |
7 | Neha | X | 8/12/95 | F | Moscow | 324 |
8 | Nishant | X | 12/6/95 | M | Moscow | 429 |
State the command that will give the output as:
Name |
Anand |
Chetan |
Geet |
Preeti |
(i) select Name from student where Class ='XI' and Class='XII';
(ii) select name from student where not Class='XI' and Class='XII';
(iii) select name from student where City="Agra" or City="Mumbai";
(iv) select name from student where City in("Agra", "Mumbai");
Choose the correct option:
What will be the output of the following SQL statement?
SELECT DAY NAME (2022-04-08)
Which command is used to delete a table? (in SQL)
What will be returned by the given query? select day of year('2015-02-10') = ______.
What will be returned by the given query? SELECT RIGHT("LEFT", 2) = ______.
What will be returned by the given query? SELECT MID('LeaminglsFun', 2, 4) = ______.
"COUNT" keyword belongs to which categories in Mysql?
The ______ function returns m raised to the nth power.
Name a function of MySQL used to give position of the first occurrence of a string2 in string1.
What will be returned by the given query? SELECT MID('BoardExamination', 2, 4) = ______.
What will be returned by the given query? SELECT DAYOFYEAR('2015-01-10') = ______.
Which of the following is not a date function?
Which of the following is not a text function?
Which function will be used to remove only the trailing spaces from a string?
Write the name of the functions to perform the following operation:
To display the day like “Monday”, and “Tuesday”, from the date when India got independence.
Write the name of the functions to perform the following operation:
To display the specified number of characters from a particular position of the given string.
Write the name of the functions to perform the following operation:
To display the name of the month in which you were born.
Write the name of the functions to perform the following operation:
To display your name in capital letters.
Write the output produced by the following SQL statement:
SELECT LEFT("INDIA", 3), RIGHT("Computer Science", 4), MID("Informatics", 3, 4), SUBSTR("Practices", 3);
Predict the output of the code given below:
s="welcome2cs"
n = len(s)
m=""
for i in range(0, n):
if (s[i] >= 'a' and s[i] <= 'm'):
m = m +s[i].upper()
elif (s[i] >= 'n' and s[i] <= 'z'):
m = m +s[i-1]
elif (s[i].isupper()):
m = m + s[i].lower()
else:
m = m +'&'
print(m)
Which type of values will not be considered by SQL while executing the following statement?
SELECT COUNT(column name) FROM inventory;
Which one of the following functions are used to find the largest value from the given data in MySQL?
Explain the following SQL function using a suitable example.
MID()
Explain the following SQL function using a suitable example.
DAYNAME()
Explain the following SQL function using a suitable example.
POWER()
Shreya, a database administrator has designed a database for a clothing shop. Help her by writing answers to the following questions based on the given table:
TABLE: CLOTH | |||||
CCODE | CNAME | SIZE | COLOR | PRICE | DOP |
C001 | JEANS | XL | BLUE | 990 | 2022-01-21 |
C002 | T-SHIRT | M | RED | 599 | 2021-12-12 |
C003 | TROUSER | M | GREY | 399 | 2021-11-10 |
C004 | SAREE | FREE | GREEN | 1299 | 2019-11-12 |
C005 | KURTI | L | WHITE | 399 | 2021-12-07 |
- Write a query to display cloth names in lowercase.
- Write a query to display the lowest price of the clothes.
- Write a query to count the total number of clothes purchased in medium size.
OR
Write a query to count the year-wise total number of clothes purchased.