- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Varun has Published 83 Articles
varun
119 Views
Actually, sometimes we can avoid data-driven relationships in tables and we need to join them. It can be done with the help of CASE statement in the SELECT list to handle the joining possibilities. To understand it, we are taking the example of three data-driven tables namely ‘Student_Detail’ which have ... Read More
varun
320 Views
With the help of mysqlimport we can upload data into multiple MySQL tables. It is illustrated in the example below −ExampleSuppose we want to upload the following data from two data files namely student1_tbl.txt −1 Saurav 11th 2 Sahil 11th 3 ... Read More
varun
271 Views
When we pass an out-of-range value in UNIX_TIMESTAMP, MySQL returns 0. The valid range of value is same as for the TIMESTAMP data type.Examplemysql> Select UNIX_TIMESTAMP('1969-01-01 04:05:45'); +---------------------------------------+ | UNIX_TIMESTAMP('1969-01-01 04:05:45') | +---------------------------------------+ | 0 ... Read More
How can we insert current date and time automatically on inserting values in other columns in MySQL?
varun
1K+ Views
In MySQL, we can insert the current date and time automatically to a column on inserting the values in another column by declaring that column as DEFAULT CURRENT_TIMESTAMP.Examplemysql> Create table testing -> ( -> StudentName varchar(20) NOT NULL, -> RegDate TIMESTAMP DEFAULT CURRENT_TIMESTAMP -> ); Query ... Read More
varun
521 Views
To count the number of occurrences of a character in a string, try to run the following code −ExampleLive Demo function displayCount() { setTimeout(function() { var ... Read More
varun
4K+ Views
To make an anchor tag refer to nothing, use “javascript: void(0)”. The following link does nothing because the expression "0" has no effect in JavaScript. Here the expression "0" is evaluated, but it is not loaded back into the current document.ExampleLive Demo ... Read More
varun
128 Views
You can create an objectUsing new keyword.Sample obj = new Sample();Using the newInstance() method and Class.forName() method.Sample obj2 = (Sample) Class.forName("Sample").newInstance();Using the clone() method by implementing Cloneable Interface (marker).Sample obj3 = (Sample) obj1.clone();Using class loader.Object obj4 = Sample.class.getClassLoader().loadClass("Sample");Using the constructor class from lang.reflect.Class cls = Sample.class; Constructor obj = cls.getDeclaredConstructors()[0]; ... Read More
varun
243 Views
The immediate function executes as soon as it is defined. To understand the role of immediate function, let’s see the difference between a function and an immediate function −Here’s immediate function −(function() { var str = "display"; }()); function display() { // this returns undefined alert(str); }Here’s ... Read More
varun
101 Views
The async function declaration as the name suggests defines an asynchronous function. This function returns an AsyncFunction object.SyntaxHere’s the syntax −async function functionname([param[, param[, ... param]]]) { statements to be executed }ExampleLet’ see an example, which prints the result after 5 seconds − ... Read More