Add to existing value in MySQL column using CONCAT function?

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

987 Views

To understand the concept, let us first create a demo table.mysql> create table addToExistingValueDemo    -> (    -> Instructor_Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    -> Instructor_Name varchar(30),    -> Instructor_TechnicalSubject text    -> ); Query OK, 0 rows affected (0.54 sec)Insert some records in the table using insert command. The query is as follows −mysql> insert into addToExistingValueDemo(Instructor_Name, Instructor_TechnicalSubject) values('John', 'C, C++'); Query OK, 1 row affected (0.15 sec) mysql> insert into addToExistingValueDemo(Instructor_Name, Instructor_TechnicalSubject) values('Carol', 'Java, Python'); Query OK, 1 row affected (0.18 sec) mysql> insert into addToExistingValueDemo(Instructor_Name, Instructor_TechnicalSubject) values('Bob', 'MySQL, SQL Server'); Query OK, 1 row ... Read More

Meaning of 'const' last in a function declaration of a C++ class?

Anvi Jain
Updated on 30-Jul-2019 22:30:25

914 Views

Sometimes we can find the keyword ‘const’ present at the last of function declaration. So what does it mean?Using this one function can be made as constant. The idea of constant function is that, the function cannot be modified from the objects, where they are called. It is recommended to use the constant functions in our program.Let us see one example of constant function.Example#include using namespace std; class MyClass {    int value;    public:       MyClass(int val = 0) {          value = val;       }       int getVal() const ... Read More

What is SEO and why it is so popular in Local businesses?

Sashi K
Updated on 30-Jul-2019 22:30:25

229 Views

SEO (Search Engine Optimisation) is meant to improve a website’s overall search-ability and visibility. Every business needs SEO, but why is SEO so important in local businesses?When it comes to digital marketing, local businesses SEO is the extremely important facet of internet marketing. Here is why ...Local SEO promotes your business's visibility when there are searches based on locations. Your business should get found when people are searching for the product's availability in that locality. These results include searches with certain Geo qualifiers like city, state, pin code, etc., and ‘near me’ searches. Based on your website's SEO, Google picks ... Read More

How to print local time in Android sqlite?

Anvi Jain
Updated on 30-Jul-2019 22:30:25

240 Views

Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to access this database, you don't need to establish any kind of connections for it like JDBC, ODBC etc.This example demonstrate about How to find highest value in Android sqlite.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to ... Read More

MySQL query to discover current default database collation (via command line client)?

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

357 Views

You need to use INFORMATION_SCHEMA.SCHEMATA for current default database collation.The syntax is as followsSELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = 'yourDatabaseName' LIMIT 1;Let us implement the above syntax to discover current default database collation (via command line client). Our database here is ‘sample’.The query is as follows −mysql> SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = 'sample' LIMIT 1;The following is the output+------------------------+ | DEFAULT_COLLATION_NAME | +------------------------+ | utf8_general_ci | +------------------------+ 1 row in set (0.00 sec)

Is it possible to divide records in both ascending and descending order in MySQL and display them alternatively?

Krantik Chavan
Updated on 30-Jul-2019 22:30:25

176 Views

Yes, you can perform this in MySQL by first getting the middle value. Let us first create a table:mysql> create table DemoTable (    UserId int NOT NULL AUTO_INCREMENT PRIMARY KEY ); Query OK, 0 rows affected (0.65 sec)Following is the query to insert some records in the table using insert command:mysql> insert into DemoTable values(); Query OK, 1 row affected (0.14 sec) mysql> insert into DemoTable values(); Query OK, 1 row affected (0.10 sec) mysql> insert into DemoTable values(); Query OK, 1 row affected (0.08 sec) mysql> insert into DemoTable values(); Query OK, 1 row affected (0.16 sec) mysql> ... Read More

What is an unsigned char in C++?

Smita Kapse
Updated on 30-Jul-2019 22:30:25

6K+ Views

In C++ we have seen there is character type data called char. Sometimes we have seen unsigned char also. So here we will see what is basically the unsigned char means. What are the basic differences between signed char and unsigned char?Signed char and unsigned char both are used to store single character. The variable stores the ASCII value of the characters. For an example if ‘A’ is stored, actually it will hold 65. For signed char we need not to write the signed keyword. But for unsigned, we have to mention the keyword. The syntax is like below.unsigned char ... Read More

What is the meaning of background app in Android?

Sashi K
Updated on 30-Jul-2019 22:30:25

7K+ Views

Foreground refers to the active apps which consume data and are currently running on the mobile. Background refers to the data used when the app is doing some activity in the background, which is not active right now.This is due to the fact that whether they are active or not, apps consume data. They may bechecking for updates or refreshing the user contentrunning ads in the backgroundsending notificationsAll these may be useful activities, but we do not want our data to deplete in the background without our permission and notice. We can restrict this background data depletion by using the ... Read More

Decimal addition in 8085 Microprocessor

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

2K+ Views

In a digital computer, everything is represented using 0s and 1s only. For example, instruction will have a code using only 0s and 1s. Data is also represented using 0s and 1s. Data can be of different types like unsigned numbers, signed numbers, floating point numbers, binary coded decimal (BCD) numbers, etc. Thus, a series of 0s and 1s will acquire a value based on the interpretation. For decimal addition, we are having a very important and common instruction DAD. Let us discuss more on that instruction now.In spite of the fact that 8085 is an 8-bit microprocessor, but there ... Read More

BCD numbers in 8085 Microprocessor

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

2K+ Views

Many a time, we are required to represent decimal numbers in a computer, and perform arithmetic on these numbers. For example, we may be required to total the marks a student has obtained in five different subjects, where obviously, the marks are awarded in decimal notation.For this purpose, the BCD code is extensively used. In BCD notation, 4 bits are used to code a digit, and so two digits of information are stored in a Byte. For example, decimal 45 is represented in BCD as of 0100 0101. Codes 10 to 15 i.e. 1010, 1011, 1100, 1101, 1110, and 1111 ... Read More

Advertisements