Sharon Christine has Published 413 Articles

How can I clone/duplicate the table along with its data, trigger and indexes?

Sharon Christine

Sharon Christine

Updated on 20-Jun-2020 06:06:40

340 Views

For creating a new table just like old one along with its data, trigger, and indexes, we need to run following two queriesCREATE TABLE new_table LIKE old_table; INSERT new_table SELECT * from old_table;Examplemysql> Create table employee(ID INT PRIMARY KEY NOT NULL AUTO_INCREMENT, NAME VARCHAR(20)); Query OK, 0 rows affected (0.21 ... Read More

What is MySQL DROP command used for?

Sharon Christine

Sharon Christine

Updated on 20-Jun-2020 06:00:45

156 Views

As the name explains, it is used to completely remove the table from the database.SyntaxDrop table table_name;Examplemysql> Drop table Student; Query OK, 0 rows affected (0.09 sec)The query above completely removes the ‘Student’ table from the database. We can observe as MySQL returns an error message after running the following ... Read More

What are unchecked exceptions in Java?

Sharon Christine

Sharon Christine

Updated on 16-Jun-2020 12:45:47

2K+ Views

An unchecked exception is the one which occurs at the time of execution. These are also called as Runtime Exceptions. These include programming bugs, such as logic errors or improper use of an API. Runtime exceptions are ignored at the time of compilation. If you have declared an array of size ... Read More

How to process Arrays in Java?

Sharon Christine

Sharon Christine

Updated on 16-Jun-2020 10:10:14

2K+ Views

To process array elements, we often use either for loop or for each loop because all of the elements in an array are of the same type and the size of the array is known. Suppose we have an array of 5 elements we can print all the elements of ... Read More

Z Algorithm

Sharon Christine

Sharon Christine

Updated on 16-Jun-2020 08:13:31

405 Views

This algorithm is named Z Algorithm because, in this algorithm, we need to create a Z array. The size of the Z array is the same as the text size. This array is used to store the length of longest possible substring starting from the current character of the main ... Read More

N Queen Problem

Sharon Christine

Sharon Christine

Updated on 16-Jun-2020 07:51:36

13K+ Views

This problem is to find an arrangement of N queens on a chess board, such that no queen can attack any other queens on the board.The chess queens can attack in any direction as horizontal, vertical, horizontal and diagonal way.A binary matrix is used to display the positions of N ... Read More

Solving Cryptarithmetic Puzzles

Sharon Christine

Sharon Christine

Updated on 16-Jun-2020 07:16:15

14K+ Views

In the crypt-arithmetic problem, some letters are used to assign digits to it. Like ten different letters are holding digit values from 0 to 9 to perform arithmetic operations correctly. There are two words are given and another word is given an answer of addition for those two words.As an ... Read More

Sudoku Solving algorithms

Sharon Christine

Sharon Christine

Updated on 16-Jun-2020 07:04:00

3K+ Views

In this section, we will try to solve the famous number maze problem called Sudoku. Sudoku is a 9 x 9 number grid, and the whole grid are also divided into 3 x 3 boxes There are some rules to solve the Sudoku.We have to use digits 1 to 9 ... Read More

Why multiple inheritance is not supported by Java?

Sharon Christine

Sharon Christine

Updated on 16-Jun-2020 06:27:30

7K+ Views

Multiple inheritances lead to ambiguity.For example, if there is a class named Sub and there are two classes Super1 and Super2 and if both contains a method named sample(). And if the class sub inherits both classes Super1 and Super2 then there will be two copies of the sampling method one ... Read More

Suffix Array

Sharon Christine

Sharon Christine

Updated on 15-Jun-2020 19:15:53

884 Views

From a given string, we can get all possible suffixes. After sorting the suffixes in lexicographical order, we can get the suffix array. Suffix arrays can also be formed using suffix trees. By using the DFS traversal of suffix trees, we can get suffix arrays. Suffix arrays are helpful to ... Read More

Advertisements