What is the Operator in MySQL

Arjun Thakur
Updated on 30-Jul-2019 22:30:23

202 Views

Here are the usages of the operator in MySQL. Case 1 This operator is similar to = operator i.e. when the value is equal then the result will become true(1), otherwise false(0). In the first case both = and operators work same. Case 2 Whenever we compare any value with NULL then the operator gives the value 0 and when we compare with NULL NULL, then it returns 1. While in case of = operator, this does not happen. Whenever we compare any value with NULL, it returns NULL. If we compare NULL with NULL, then ... Read More

Open MySQL Root Access from All Hosts

Chandu yadav
Updated on 30-Jul-2019 22:30:23

971 Views

To open root access from all hosts, we need to change the database to “mysql” with the help of USE command. The syntax of USE command is as follows − USE anyDatabasename; Now, I will use predefined database ‘mysql’, which is as follows − mysql> use mysql; Database changed I have changed the database above. Here is the query to get root access from the entire host − mysql> UPDATE user set host='%' where host='localhost'; Query OK, 6 rows affected (0.19 sec) Rows matched: 6 Changed: 6 Warnings: 0

SharedArrayBuffer byteLength Property in JavaScript

karthikeya Boyini
Updated on 30-Jul-2019 22:30:23

102 Views

The byteLength property of the SharedArrayBuffer returns an unsigned, 32-bit integer that specifies the size/length of a SharedArrayBuffer. Syntax Its Syntax is as follows sharedArrayBuffer.byteLength Example Live Demo JavaScript Example var sharedArrayBuffer = new SharedArrayBuffer(8); var result = sharedArrayBuffer.byteLength; document.write("length of the shared array buffer is: " + result); Output length of the shared array buffer is: 8

MOV R, M Instruction in 8085 Microprocessor

Samual Sam
Updated on 30-Jul-2019 22:30:23

15K+ Views

In 8085 Instruction set, MOV r, M is an instruction where the 8-bit data content of the memory location as pointed by HL register pair will be moved to the register r. Thus this is an instruction to load register r with the 8-bit value from a specified memory location whose 16-bit address is in HL register pair. As r can have any of the seven values, there are seven opcodes for this type of instruction. r = A, B, C, D, E, H, or L Mnemonics, Operand Opcode Bytes MOV A, M ... Read More

Comparison of Java and .NET

Samual Sam
Updated on 30-Jul-2019 22:30:23

384 Views

Java is a high-level programming language originally developed by Sun Microsystems and released in 1995. Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. .NET framework is a computer software framework invented by Microsoft. It runs on Microsoft Windows OS (Operating Systems). It provides user interface, data access, database connectivity, cryptography, web application development, etc. Languages Java supports only Java patterns. .NET supports multiple languages such as VB.NET, C#, F#, etc. Platforms Java is platform independent and it can run on Windows, Linux and Mac OS. .NET works on Windows. Runtime ... Read More

Resolve Error 1046: No Database Selected

Ankith Reddy
Updated on 30-Jul-2019 22:30:23

3K+ Views

The 1046 error occurs if you forget to select any database before creating a table. Let us see how and why this error occurs. We will try to create a table without selecting a database − mysql> CREATE table MyTable1 -> ( -> id int -> ); ERROR 1046 (3D000): No database selected Or mysql> INSERT into sample values(1); ERROR 1046 (3D000): No database selected Look at the output above, we are getting the same 1046 error: “No database selected” Now, we can resolve this error after selecting any ... Read More

Voice over LTE (VoLTE)

Chandu yadav
Updated on 30-Jul-2019 22:30:23

2K+ Views

Voice over long-term evolution or Voice-over LTE (VoLTE) are the standards in all-IP networks for voice communication as well as data communication over 4G LTE networks. VoLTE offers services like creating, provisioning and managing high-speed voice, data, multimedia and messaging services on a 4G wireless network for mobile and portable devices. It uses the IP multimedia subsystem (IMS) to deliver the services. It transmits everything through only packets and thus supports only packet switching. So, all data from any circuit-switched networks like GSM need to be converted to packets before they are transmitted by VoLTE. The communication is depicted ... Read More

Get SUM Function in MySQL to Return 0 if No Values are Found

George John
Updated on 30-Jul-2019 22:30:23

8K+ Views

To return Sum as ‘0’ if no values are found, use IFNULL or COALESCE commands. The following is the syntax for IFNULL. SELECT IFNULL(SUM(NULL), 0) AS aliasName; Let us now implement the above syntax in the following query. mysql> SELECT IFNULL(SUM(NULL), 0) AS SUMOFTWO; The following is the output of the above query, which returns 0. +----------+ | SUMOFTWO | +----------+ | 0 | +----------+ 1 row in set (0.00 sec) Here is the syntax for COALESCE. mysql> SELECT COALESCE(SUM(NULL),0) as SUMOFTWO; The following is the output that returns 0 using the SUM() function. +----------+ | SUMOFTWO | +----------+ | 0 | +----------+ 1 row in set (0.00 sec)

Set NOW as Default Value for DATETIME in MySQL

Ankith Reddy
Updated on 30-Jul-2019 22:30:23

8K+ Views

We can set the now() function as a default value with the help of dynamic default. First, we will create a table with data type” datetime”. After that, we will set now() as the default value for column “MyTime” as shown below. Creating a table. mysql> create table DefaultDateTimeDemo -> ( -> MyTime datetime default CURRENT_TIMESTAMP -> ); Query OK, 0 rows affected (0.59 sec) After creating the above table, we won’t insert any value while using the insert command. This is done so that we can get the ... Read More

Hash Equivalent for Java System.exit(0)

Ankith Reddy
Updated on 30-Jul-2019 22:30:23

2K+ Views

The C# equivalent for Java System.exit(0) is − Environment.Exit(exitCode); The Environment.Exit() method terminates this process and returns an exit code to the operating system. Above, use exitCode as 0 (zero) to show that the process completed successfully. Use exitCode as a non-zero number to show an error, for example − Environment.Exit(1) Return a value 1 to show that the file you want is not present Environment.Exit(2)exit Return a value 2 to indicate that the file is in an incorrect format.

Advertisements