Moumita has Published 175 Answers

What are the privileges required to use triggers?

Moumita

Moumita

Updated on 22-Jun-2020 12:09:13

We must have SUPER privileges to create or destroy triggers with the help of a CREATE or DROP statement. Other than that if the triggered statements use OLD or NEW then there are some additional privileges as follows which we require −To assign the value of a column with SET ... Read More

What happens to the current MySQL transaction if the session is ended in the middle of a transaction?

Moumita

Moumita

Updated on 22-Jun-2020 11:31:42

Suppose if a session is ended in the middle of a transaction then that current MySQL transaction will be rolled back by MySQL and ended. It means that all the database changes made in the current transaction will be removed. It is called n implicit rollback when the session is ... Read More

While linking the strings, if I will add a NULL value then what would be the output of a CONCAT_WS() function?

Moumita

Moumita

Updated on 22-Jun-2020 07:22:17

Actually, CONCAT_WS() function returns NULL if and only if the first argument of it i.e. the separator is NULL. An example is as below −mysql> Select CONCAT_ws(NULL, 'Tutorial', 'Point', '.com'); +-------------------------------------------+ | CONCAT_ws(NULL, 'Tutorial', 'Point', '.com') | +-------------------------------------------+ | NULL                     ... Read More

What is the difference between MySQL ISNULL() function and IS NULL operator?

Moumita

Moumita

Updated on 22-Jun-2020 06:47:04

Significantly both ISNULL() function and IS NULL operator do not have any difference and shares some common behaviors’. The only difference which we can see is in their syntax. ISNULL() function would have the expression as its argument whereas IS NULL comparison operator is having the expression to its left. ... Read More

How can we get some starting number of characters from the data stored in a MySQL table’s column?

Moumita

Moumita

Updated on 22-Jun-2020 05:22:02

To get some starting number of characters from the data stored in the MySQL table’s column, we can use MySQL LEFT() function. It will return the number of characters specified as its argument. We need to provide the name of the column, having the particular record from which we want ... Read More

Which function is a synonym of MySQL LENGTH() function?

Moumita

Moumita

Updated on 20-Jun-2020 11:21:50

As we know that, MySQL OCTET_LENGTH() function also measures the string length in ‘bytes’ hence, it is the synonym of MySQL LENGTH() function. The syntax of this function is OCTET_LENGTH(Str) where Str is a string whose length in characters has to be returned.It is also not multi-byte safe like LENGTH() ... Read More

How can we insert a new row into a MySQL table?

Moumita

Moumita

Updated on 20-Jun-2020 07:37:01

With the help of INSERT INTO command, a new row can be inserted into a table.SyntaxINSERT INTO table_name values(value1, value2, …)ExampleSuppose we have a table named ‘Employee’ with three columns ‘Emp_id’, ‘Emp_name’ and ‘Emp_Sal’ then with the help of following query we can add new rows to the table −mysql> ... Read More

C++ Standard Library Header Files

Moumita

Moumita

Updated on 18-Jun-2020 13:57:27

The C++ standard library comprises of different types of libraries. The following is a list of all these Types with the libraries under them.Utilities library<cstdlib> − General purpose utilities like program control, dynamic memory allocation, random numbers, sort and search<csignal>  −Functions and macro constants for signal management(eg SIGINT, etc)<csetjmp>  −Macro ... Read More

Java Program to Compare Two Strings

Moumita

Moumita

Updated on 18-Jun-2020 07:23:24

The compareTo() method compares two strings lexicographically. The comparison is based on the Unicode value of each character in the strings. The character sequence represented by this String object is compared lexicographically to the character sequence represented by the argument string.The result is a negative integer if this String object ... Read More

Best practice for variable and method naming in Java

Moumita

Moumita

Updated on 17-Jun-2020 13:49:24

All Java components require names. Names used for classes, variables and methods are called identifiers. In Java, there are several points to remember about identifiers. They are as follows -All identifiers should begin with a letter (A to Z or a to z), currency character ($) or an underscore (_). After ... Read More

Previous 1 ... 4 5 6 7 8 9 10 ... 18 Next
Advertisements