Chandu yadav has Published 1163 Articles

How to can I get the names of my MySQL table columns?

Chandu yadav

Chandu yadav

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

426 Views

You can use SHOW command for this. Following is the syntax −show columns from yourTableName;Let us first create a table −mysql> create table DemoTable (    StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,    StudentFirstName varchar(20),    StudentLastName varchar(20),    StudentAge int,    StudentAddress varchar(200) ); Query OK, 0 rows affected ... Read More

Line Splicing in C/C++

Chandu yadav

Chandu yadav

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

376 Views

In this section we will see what is the line spacing in C or C++. Sometimes we put some single line comment using double slash “//”. The one-line comment is basically ends when we move to the next line. But if we put back slash at the end of some ... Read More

a 8085 Program to perform bubble sort based on choice

Chandu yadav

Chandu yadav

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

471 Views

Now let us see a program of Intel 8085 Microprocessor. In this program we will see how to perform bubble sort in based on choice.Problem Statement:Write 8085 Assembly language program to perform bubble sorting operation on a set of data, and arrange them into ascending or descending order based on ... Read More

Sort in MySQL and increment value?

Chandu yadav

Chandu yadav

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

316 Views

You can use update command along with a user-defined variable. Let us first create a table −mysql> create table DemoTable (    FirstName varchar(20),    Position int ); Query OK, 0 rows affected (0.71 sec)Insert some records in the table using insert command −mysql> insert into DemoTable values('Chris', 100); Query OK, ... Read More

Conversion constructor in C++?

Chandu yadav

Chandu yadav

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

701 Views

In this section we will see what is the conversion constructor in C++ class. A constructor is a special type of function of class. It has some unique property like, its name will be same as class name, it will not return any value etc. The constructors are used to ... Read More

How to use TIME type in MySQL?

Chandu yadav

Chandu yadav

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

183 Views

Let us first create a table. Within that we have set a column with type TIME to get the login time −mysql> create table DemoTable (    Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    LoginTime TIME NULL ); Query OK, 0 rows affected (0.69 sec)Insert records in the table ... Read More

When can I use a forward declaration in C/C++?

Chandu yadav

Chandu yadav

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

711 Views

In C++ the forward declaration lets the code following the declaration know that there is are classes with the name Person. This satisfies the compiler when it sees these names used. Later the linker will find the definition of the classes.Example CodeClass Person; void myFunc(Person p1) { ... Read More

Insert the specified element at the specified position in Java CopyOnWriteArrayList

Chandu yadav

Chandu yadav

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

76 Views

Using the add() method, insert the specified element at the specified position in the CopyOnWriteArrayList.The syntax is as followsvoid add(int index, E ele)Here, the parameter index is where you want to insert the element and ele is the element to be inserted to this list. To work with CopyOnWriteArrayList class, ... Read More

Set auto increment initial value for MySQL table using ALTER command

Chandu yadav

Chandu yadav

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

554 Views

To set auto increment initial value for MySQL table, use ALTER command. The first step would bealter table yourTableName modify yourColumnName int NOT NULL AUTO_INCREMENT PRIMARY KEY, add index(yourColumnName);The second step is as followsalter table yourTableName AUTO_INCREMENT=yourStartingValue;To understand the above syntax, let us create a table. The query to create ... Read More

How to change a specific char in a MySQL string?

Chandu yadav

Chandu yadav

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

241 Views

To change a specific char in a MySQL string, you can use CONCAT() along with SUBSTRING().Let us first create a table −mysql> create table DemoTable (    Id int NOT NULL AUTO_INCREMENT PRIMARY KEY,    Value varchar(200) ); Query OK, 0 rows affected (0.60 sec)Insert some records in the table ... Read More

Advertisements