Display MySQL Results as Comma-Separated List

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

2K+ Views

We can show the result as a comma separated list with the help of the ‘concat()’ function with the parameter ‘, ’. Let us see an example now. Firstly, we will create a table. The CREATE command is used to create a table. mysql> create table CommaSeperateDemo - > ( - > Id int, - > FirstName varchar(100), - > LastName varchar(100) - > ); Query OK, 0 rows affected (0.93 sec) Inserting records mysql> insert into CommaSeperateDemo values(1, 'John', 'Taylor'); Query ... Read More

Instruction Type MVI R, D8 in 8085 Microprocessor

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

14K+ Views

MVI is a mnemonic, which actually means “Move Immediate”. With this instruction, we can load a register with an 8-bitsor 1-Bytevalue. This instruction supports immediate addressing mode for specifying the data in the instruction. In the instruction “d8” stands for any 8-bit data, and ‘r’ stands for any one of the registers e.g. A, B, C, D, E, H or L. So this r can replace any one of the seven registers. As ‘r’ can have any of the seven register names, so there are seven opcodes for this type of instruction. It occupies 2-Bytes in the memory. ... Read More

prev Function in PHP

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

108 Views

The prev() function rewinds the internal array pointer. It outputs the previous element in the array. Syntax prev(arr) Parameters arr − The specified array. Required. Return The pos() function returns the value of the previous element in an array. Example The following is an example − Live Demo Output one two one

MyISAM versus InnoDB in MySQL

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

304 Views

Both are engine types. Here is the query by which we can get to know which engine type and tables are being used. Firstly, we will choose the database with the help of USE command − mysql> USE business; Database changed Here is the query through which we can know which table or engine is being used − mysql> SHOW table status; The following is the output +------------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+--------------------+----------+----------------+---------+ |Name | Engine | Version | Row_format | ... Read More

Change MySQL Column Definition

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

245 Views

To change MySQL column definition, we can use modify or change clause with ALTER command. Let us first create a table with a column as ID, with int data type. We will modify the same column name with varchar data type. Creating a table. mysql> create table ModifyColumnDemo -> ( -> id int -> ); Query OK, 0 rows affected (0.52 sec) Now, let us write the syntax to change the column definition. The syntax is as follows − alter table yourTableName modify column columnName data type; ... Read More

Rank Function in MySQL

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

781 Views

The rank() function can be used to give a rank for every row within the partition of a result set. First, let us create a table − mysql> create table RankDemo mysql> ( mysql> id int mysql> ); Query OK, 0 rows affected (0.53 sec) Inserting records into table. mysql> insert into RankDemo values(1); Query OK, 1 row affected (0.19 sec) mysql> insert into RankDemo values(3); Query OK, 1 row affected (0.12 sec) mysql> insert into RankDemo values(3); Query OK, 1 row affected (0.11 ... Read More

Long Term Evolution (LTE)

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

2K+ Views

Long – term evolution or LTE is a standard for wireless technology based upon GSM/EDGE and UMTS/HSPA technologies. It offers increased network capacity and speed to mobile device users. It is an extension of the 3G technology for high-speed mobile communications. LTE-Advanced is an improvement over LTE that meets the criteria of 4G wireless communications as laid down by IMT-Advanced standards. It provides greater speeds and better quality of communications. Both LTE and LTE-A are used for mobile broadband communications and in VoIP. Features of LTE LTE was specified by The 3rd Generation Partnership Project (3GPP) release 8 was ... Read More

Batch Insert in MySQL

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

3K+ Views

To do a batch insert, we need to use all column names with parenthesis, separated by ‘, ’. Let us see an example. First, we will create a table. The following is the CREATE command to create a table. mysql> CREATE table MultipleRecordWithValues - > ( - > id int, - > name varchar(100) - > ); Query OK, 0 rows affected (0.88 sec) The following is the syntax of batch insert. INSERT into yourTableName values(column1, column2, ....N), (column1, column2, ....N), (column1, column2, ....N), ...........N; ... Read More

Instruction Type MOV R1, R2 in 8085 Microprocessor

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

14K+ Views

In 8085 Instruction set, MOV is a mnemonic, which stands for “MOVe”. In this instruction 8-bit data value in register r2 will be moved to the 8-bit register r1. Note that in 8085 instructions, as the first operand specifies the destination, and the second one the source, so here also r1 is destination register and r2 is the source register. This instruction uses register addressing for specifying the data. Here, “r1” and “r2”can be any one of the following registers. r1, r2 = A, B, C, D, E, H, or L As r1 can have any one of ... Read More

When to Use a Composite Index in MySQL

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

602 Views

The composite index can be used when we are using sub queries. The advantages of using composite index are in case of. Joining Filtering Selecting The following is the syntax of index. index(column_name1, column_name2, column_name3, column_name4, ............................N) Let us create a table first and within that we have set index. mysql> create table MultipleIndexDemo - > ( - > id int, - > FirstName varchar(100), - > LastName varchar(100), - > Address varchar(200), - > index(id, LastName, ... Read More

Advertisements