Moumita has Published 149 Articles

How BEFORE INSERT triggers can be used to emulate CHECK CONSTRAINT for inserting values in the table?

Moumita

Moumita

Updated on 22-Jun-2020 13:02:44

455 Views

As we know that MySQL supports foreign key for referential integrity but it does not support CHECK constraint. But we can emulate them by using triggers. It can be illustrated with the help of an example given below −ExampleSuppose we have a table named ‘car’ which can have the fix ... Read More

What are the privileges required to use triggers?

Moumita

Moumita

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

231 Views

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

164 Views

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

121 Views

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

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

129 Views

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

193 Views

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

1K+ Views

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

Best practice for variable and method naming in Java

Moumita

Moumita

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

641 Views

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

EPC Gen 2 Tag Identification Layer

Moumita

Moumita

Updated on 03-Jun-2020 07:41:49

688 Views

Tag identification layer of Electronic Product Code (EPC) Gen 2 lays down the method by which the readers can receive the identifiers from the tags. EPC Gen 2 (second generation) RFID (Radio Frequency Identification) network has two main components, tags and readers. RFID tags are affixed on objects with EPC ... Read More

What is backscatter?

Moumita

Moumita

Updated on 03-Jun-2020 07:39:53

2K+ Views

Backscatter is a method that uses an incident radio-frequency (RF) signal to transmit data without a battery or power source. It employs passive reflection and modulation of the incoming RF signal, and converts it into tens or hundreds of microwatts of electricity, that can be encoded for data communications.It differs ... Read More

Previous 1 ... 5 6 7 8 9 ... 15 Next
Advertisements