हिंदी

Write the output produced by the following SQL statement: SELECT ROUND(342.9234, -1); - Computer Science (Python)

Advertisements
Advertisements

प्रश्न

Write the output produced by the following SQL statement:

SELECT ROUND(342.9234, -1);

एक पंक्ति में उत्तर
Advertisements

उत्तर

The result of the given query is 340.

shaalaa.com
Functions in SQL
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 9: Structured Query Language (SQL) - Exercise [पृष्ठ १७७]

APPEARS IN

एनसीईआरटी Computer Science [English] Class 12
अध्याय 9 Structured Query Language (SQL)
Exercise | Q 2. b) | पृष्ठ १७७

संबंधित प्रश्न

______ keyword is used to find out the number of values in a column?


Which method is used to get the row-id of the last modified row?


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:


Which of the following is not an aggregate function?


The char() function in MySql is an example of ______. 


What will be returned by the given query? Select round(23456.1234, -2) = ______.


What will be returned by the given query? SELECT MID('LeaminglsFun', 2, 4) = ______.


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 INSTR('INFORMATIONFORM', 'FOR') = ______.


What will be returned by the given query? SELECT DAYOFYEAR('2015-01-10') = ______.


Which function will be used to remove only the trailing spaces from a string?


What is the general format of UPPER() return type?


Which statement is used to count the number of rows in table?


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 output produced by the following SQL statement:

SELECT    LEFT("INDIA", 3),    RIGHT("Computer Science", 4),    MID("Informatics", 3, 4), SUBSTR("Practices", 3);


Which function is used to display the total number of records from a table in a database?


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 one of the following functions are used to find the largest value from the given data in MySQL?


Based on the table STUDENT given here, write suitable SQL queries for the following:

Roll No Name Class Gender City Marks
1 Abhishek XI M Agra 430
2 Prateek XII M Mumbai 440
3 Sneha XI F Agra 470
4 Nancy XII F Mumbai 492
5 Himanshu XII M Delhi 360
6 Anchal XI F Dubai 256
7 Mehar X F Moscow 324
8 Nishant X M Moscow 429
  1. Display gender-wise highest marks.
  2. Display city-wise lowest marks.
  3. Display the total number of male and female students.

Write suitable SQL query for the following:

Display the position of occurrence of the string ‘COME’ in the string ‘WELCOME WORLD’.


Write suitable SQL query for the following:

Round off the value 23.78 to one decimal place.


Write suitable SQL query for the following:

Remove all the expected leading and trailing spaces from a column userid of the table ‘USERS’.


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()


Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×