George John has Published 1234 Articles

How can we remove FOREIGN KEY constraint from a column of an existing MySQL table?

George John

George John

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

9K+ Views

We can remove FOREIGN KEY constraint from a column of an existing table by using DROP keyword along with ALTER TABLE statement. Syntax ALTER TABLE table_name DROP FOREIGN KEY constraint_name Here constraint name is the name of foreign key constraint which we applied while creating the table. If ... Read More

How can we apply AUTO_INCREMENT to a column?

George John

George John

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

101 Views

AUTO_INCREMENT means that the column will get the value automatically. To illustrate it we have created a table ‘employees’ as follows − mysql> Show Create Table employees\G *************************** 1. row *************************** Table: employees Create Table: CREATE TABLE `employees` ( `Id` int(11) NOT NULL AUTO_INCREMENT, ... Read More

Returning an array in Java

George John

George John

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

122 Views

Yes, an array can be returned from a java function. See the example below − Example public class Tester { public static void main(String[] args) { int[] array = getData(); for(int i: array) { System.out.println(i); } } public static int[] getData() { int[] dataArray = {1, 2, 3, 4}; return dataArray; } } Output 1 2 3 4

How to get the list of tables in default MySQL database?

George John

George John

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

282 Views

As we know that the default MySQL database would be the database that is currently in use for subsequent queries. We can get the list of tables in that database by using SHOW TABLES statement. mysql> SHOW TABLES; +------------------+ | Tables_in_sample | +------------------+ | employee ... Read More

How to redirect URL to the different website after few seconds?

George John

George John

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

5K+ Views

Page redirection is a situation where you clicked a URL to reach a page X but internally you were directed to another page Y. It happens due to page redirection. To redirect URL to a different website after few seconds, use the META tag, with the content attribute. The attributes ... Read More

When is a semicolon after } mandated in C++ Program?

George John

George John

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

2K+ Views

A semicolon after a close brace is mandatory if this is the end of a declaration. In case of braces, they have used in declarations of class, enum, struct, and initialization syntax. At the end of each of these statements, we need to put a semicolon. For example, class ... Read More

What is the fastest, pure JavaScript, Graph visualization toolkit?

George John

George John

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

75 Views

The fastest and pure JavaScripr Graph visualization toolkit isJavaScript InfoVis Toolkit. With it, you can, Perform Graph manipulation, Create bar graphs, Custom nodes, Implementing NodeTypes Adding subtrees, Drag and drop nodes, etc.

How to add a Favicon to Your WordPress Site?

George John

George John

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

129 Views

A favicon is a little icon visible on the web browser tab, just before the page title. It is generally a logo with the smaller size. You need to include a Site Icon in WordPress to add a favicon to your WordPress site. Login to your WordPress website and from ... Read More

Checking for Null or Empty in Java.

George John

George John

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

11K+ Views

We can check whether a particular String is empty or not, using isBlank() method of the StringUtils class. This method accepts an integer as a parameter and returns true if the given string is empty, or false if it is not. Example Live Demo import org.apache.commons.lang3.StringUtils; public ... Read More

Comments in C++ Programming Language

George John

George John

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

166 Views

Program comments are explanatory statements that you can include in the C++ code. These comments help anyone reading the source code. All programming languages allow for some form of comments. C++ supports single-line and multi-line comments. All characters available inside any comment are ignored by C++ compiler. Single line comments ... Read More

Advertisements