Jennifer Nicholas has Published 291 Articles

What is the use of CHECK TABLE statement in maintaining the MySQL tables?

Jennifer Nicholas

Jennifer Nicholas

Updated on 20-Jun-2020 12:54:54

155 Views

There may be something wrong which can happen to the database server e.g., the server was shutdown unexpectedly, error while writing data to the hard disk, etc. These situations could make the database operate incorrectly and in the worst case, it can be crashed.With the help of CHECK TABLE statement ... Read More

How DIFFERENCES between tables can be implemented with the help of MySQL joins?

Jennifer Nicholas

Jennifer Nicholas

Updated on 20-Jun-2020 11:11:04

91 Views

We can get the differences between the tables by unioning exclusion joins from 1st table to 2nd table and from 2nd table to 1st table. To understand it, we are taking the example of following two tables −mysql> Select * from value1; +-----+-----+ | i   | j   | ... Read More

What would be the effect on the output of MySQL LAST_INSERT_ID() function in the case on multiple-row insert?

Jennifer Nicholas

Jennifer Nicholas

Updated on 20-Jun-2020 07:39:34

264 Views

As we know that MySQL LAST_INSERT_ID() function returns the latest generated sequence number but in case of multiple row-insert it would return the sequence number generated by the foremost inserted row.Examplemysql> Insert into Student(Name) values('Ram'), ('Mohan'), ('Aryan'); Query OK, 3 rows affected (0.03 sec) Records: 3 Duplicates: 0 Warnings: 0The query ... Read More

How can I store the fixed length string as well as variable length string in the same MySQL table?

Jennifer Nicholas

Jennifer Nicholas

Updated on 20-Jun-2020 07:08:50

591 Views

As we know that CHAR is used to store fixed length string and VARCHAR is used to store variable length strings. Hence we can store a fixed length as well as variable length string in the same table by declaring a column as CHAR and other as VARCHAR.Examplemysql> Create Table ... Read More

What is the #define Preprocessor in C++?

Jennifer Nicholas

Jennifer Nicholas

Updated on 18-Jun-2020 13:05:52

558 Views

The #define creates a macro, which is the association of an identifier or parameterized identifier with a token string. After the macro is defined, the compiler can substitute the token string for each occurrence of the identifier in the source file.#define identifier token-stringThis is how the preprocessor is used. The ... Read More

How to convert PHP array to JavaScript array?

Jennifer Nicholas

Jennifer Nicholas

Updated on 18-Jun-2020 12:30:17

3K+ Views

You can use PHP array in JavaScript. It works for the single as well as the multidimensional array. Use the json_encode() method to achieve this.Let’s say Our PHP array is −$myArr = array('Amit', 'amit@example.com');Converting PHP array into JavaScript. var arr = ; Now, let’s finally learn how to access it ... Read More

Any good resource for java interview questions

Jennifer Nicholas

Jennifer Nicholas

Updated on 17-Jun-2020 13:50:04

223 Views

There are many sites which are good resource for java interview questions-answers. Following is the list of most popular websites.Tutorialspoint www.tutorialspoint.comStackOverflow www.stackoverflow.comDZone www.dzone.comWikipedia www.wikipedia.orgIBM Developer Works www.ibm.com/developerworks/java/TechGig www.techgig.comGitHub www.github.comJava documentation docs.oracle.com/javase/Coursera www.coursera.org/JavaWorld www.javaworld.com/Read More

How to convert a String containing Scientific Notation to correct JavaScript number format?

Jennifer Nicholas

Jennifer Nicholas

Updated on 17-Jun-2020 06:44:36

1K+ Views

To convert a string with Scientific Notation, use the Number function. Pass the value to this function.ExampleYou can try to run the following code to convert a string to correct number format −Live Demo                    document.write("String with Scientific Notation converted ... Read More

How to calculate the difference between two dates in JavaScript?

Jennifer Nicholas

Jennifer Nicholas

Updated on 17-Jun-2020 06:27:09

2K+ Views

To get dates in JavaScript, use the getTime() method. Forgetting the difference between two dates, calculate the difference between date and time.ExampleYou can try to run the following code to learn how to calculate a difference between two dates −Live Demo               ... Read More

How to create JavaScript objects using object() constructor?

Jennifer Nicholas

Jennifer Nicholas

Updated on 16-Jun-2020 13:53:02

370 Views

A constructor is a function that creates and initializes an object. JavaScript provides a special constructor function called Object() to build the object. The return value of the Object() constructor is assigned to a variable.The variable contains a reference to the new object. The properties assigned to the object are ... Read More

Previous 1 ... 4 5 6 7 8 ... 30 Next
Advertisements