Sai Subramanyam

Sai Subramanyam

67 Articles Published

Articles by Sai Subramanyam

Page 5 of 7

How to change the look of Python operators?

Sai Subramanyam
Sai Subramanyam
Updated on 30-Jul-2019 205 Views

Python and most mainstream languages do not allow changing how operators look. If you're trying to replace something like a == b with a equals b, you can't do that. In Python the restriction is quite intentional — an expression such as a equals b would look ungrammatical to any reader familiar with Python.

Read More

What would be the effect on MySQL output if we have the combination of NULL and other values in the list of strings, provided as arguments in FIELD() function?

Sai Subramanyam
Sai Subramanyam
Updated on 30-Jul-2019 128 Views

There will be a significant change in the output if we have the combination of NULL and other values in the list of strings, provided as arguments in FIELD() function. Following example will demonstrate it Example mysql> Select FIELD('good', 'Ram', 'is', 'good', 'boy'); +---------------------------------------+ | FIELD('good', 'Ram', 'is', 'good', 'boy') | +---------------------------------------+ | 3 | +---------------------------------------+ 1 row in set (0.00 sec) ...

Read More

How to show a while loop using a flow chart in JavaScript?

Sai Subramanyam
Sai Subramanyam
Updated on 30-Jul-2019 329 Views

The purpose of a while loop is to execute a statement or code block repeatedly as long as an expression is true. Once the expression becomes false, the loop terminates. Let’s see how to show while loop using flowchart in JavaScript −

Read More

How can we create a MySQL view with GROUP BY clause?

Sai Subramanyam
Sai Subramanyam
Updated on 30-Jul-2019 2K+ Views

We can use GROUP BY to group values from a column, and, if we want, we can perform calculations on that column. You can use COUNT, SUM, AVG, etc., functions on the grouped column. To understand GROUP BY clause with views we are creating a view named ‘Info’ using the base table ‘Student_info’ having the following data − mysql> Select * from Student_info; +------+---------+------------+------------+ | id | Name | Address | Subject | +------+---------+------------+------------+ | 101 | YashPal | Amritsar | History ...

Read More

What are the drawbacks of using test database?

Sai Subramanyam
Sai Subramanyam
Updated on 30-Jul-2019 251 Views

There is a database named test in the list of databases displayed by the statement SHOW DATABASES. We can use test database but the main disadvantage is that anything created in this database can be removed/changed by anyone else with access to it. To avoid this we should take permission from MySQL administrator to use a database of our own. For taking permission following command must be run − mysql> grant all on tutorial.* to root@localhost; Query OK, 0 rows affected (0.10 sec) In the above command, I am taking permission for the tutorial database. Root is the ...

Read More

How can I update MySQL table after quoting the values of a column with a single quote?

Sai Subramanyam
Sai Subramanyam
Updated on 30-Jul-2019 885 Views

As we know that with the help of QUOTE() function we can put the values of a column in single quotes. By using QUOTE() function with UPDATE clause we can update the table having quoted values. We need to give column name as the parameter of QUOTE() function. Following example will update the table ‘examination_btech’ after putting the values of column ‘Course’ in single quotes. Example mysql> UPDATE examination_btech SET Course = QUOTE(Course); Query OK, 10 rows affected (0.05 sec) mysql> Select * from examination_btech; +--------+----------+----------+ | RollNo | Name | Course ...

Read More

What happens if a NULL argument is provided in MySQL CONV() function?

Sai Subramanyam
Sai Subramanyam
Updated on 30-Jul-2019 165 Views

MySQL will return NULL as the output if any of the argument of CONV() function is NULL or if the value provided for the base is out of limit(i.e. not between minimum 2 and maximum 36). Following examples would demonstrate it. Example mysql> Select CONV(10,NULL,2); +-----------------+ | CONV(10, NULL,2)| +-----------------+ | NULL | +-----------------+ 1 row in set (0.00 sec) mysql> Select CONV(10,10, NULL); +------------------+ | CONV(10,10, NULL)| +------------------+ | NULL | +------------------+ 1 row in set (0.00 sec) mysql> Select CONV(NULL,10,2); +-----------------+ | CONV(null,10,2) | +-----------------+ | NULL | +-----------------+ 1 row in set (0.00 sec)

Read More

In the query [SELECT column1, column2 FROM table_name WHERE condition; ] which clause among ‘SELECT’, ‘WHERE’ and ‘FROM’ is evaluated in the last by the database server and why?

Sai Subramanyam
Sai Subramanyam
Updated on 30-Jul-2019 533 Views

As we know that SELECT clause is used to show all the rows and columns hence SELECT clause is evaluated in the last by the database server.

Read More

How changes, made in the current transaction, can be permanently eliminated from MySQL database?

Sai Subramanyam
Sai Subramanyam
Updated on 30-Jul-2019 164 Views

We can use ROLLBACK command to eliminate the changes, made in a current transaction, permanently from MySQL database. Suppose if we run some DML statements and it updates some data objects, then ROLLBACK command will eliminate these updates permanently from the database. Example Suppose we have the following data in table ‘marks’ and we applied the transaction and ROLLBACK command as follows − mysql> SELECT * FROM Marks; +------+---------+---------+-------+ | Id | Name | Subject | Marks | +------+---------+---------+-------+ | 1 | Aarav | Maths | ...

Read More

How are variables allocated memory in JavaScript?

Sai Subramanyam
Sai Subramanyam
Updated on 30-Jul-2019 442 Views

JavaScript handling of the variable is different from other programming languages C, C++., Java, etc. Variables in JavaScript can be thought of as named containers. You can place data into these containers and then refer to the data simply by naming the container. Before you use a variable in a JavaScript program, you must declare it. Variables are declared with the var keyword as follows. var rank; var points; Storing a value in a variable is called variable initialization. You can do variable initialization at the time of variable creation or at a ...

Read More
Showing 41–50 of 67 articles
« Prev 1 3 4 5 6 7 Next »
Advertisements