Abhinaya has Published 62 Articles

How do we count the total duplicate records in a column of MySQL table?

Abhinaya

Abhinaya

Updated on 13-Feb-2020 07:31:52

1K+ Views

Suppose we have the following table named stock_item in which the column quantity is having duplicate values i.e. for item name ‘Notebooks’ and ‘Pencil’, the column ‘Quantity’ is having duplicate values ‘40’ and for items ‘Shirts’, ‘Shoes’ and ‘Trousers’ triplicate value 29 is hold by column ‘quantity’ as shown in ... Read More

What are forward declarations in C++?

Abhinaya

Abhinaya

Updated on 12-Feb-2020 06:14:19

341 Views

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. exampleClass Person; void myFunc(Person p1) {    // ... } Class Person ... Read More

Increment ++ and decrement -- Operators in C++

Abhinaya

Abhinaya

Updated on 11-Feb-2020 05:13:19

1K+ Views

The increment operator ++ adds 1 to its operand, and the decrement operator -- subtracts 1 from its operand. So, x = x+1; is the same as x++;And similarly, x = x-1; is the same as x--;Both the increment and decrement operators can either precede (prefix) or follow (postfix) the ... Read More

How can we tackle MySQL error ‘ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement’ while importing or exporting the data?

Abhinaya

Abhinaya

Updated on 07-Feb-2020 05:31:58

945 Views

MySQL throws this error because of the two reasons, either no directory is specified under --secure--file--priv variable or we are giving the wrong path in our query while importing or exporting the data. To tackle this error we must have to check the value of –secure—file—priv variable by following query ... Read More

How can we MySQL LOAD DATA INFILE statement with ‘FIELDS TERMINATED BY’ option to import data from text file into MySQL table?

Abhinaya

Abhinaya

Updated on 06-Feb-2020 05:56:50

784 Views

‘FIELDS TERMINATED BY’ option should be used when the text file which we want to import into MySQL table is having the values which are separated by a comma(, ) or maybe with any other separator like a colon(:), semicolon(;) etc. It can be understood with the help of the ... Read More

How to load classes at runtime from a folder or Java package

Abhinaya

Abhinaya

Updated on 04-Feb-2020 11:06:03

625 Views

Using CLASSPATH, you can load any classes at runtime.Like the .java source files, the compiled .class files should be in a series of directories that reflect the package name. However, the path to the .class files does not have to be the same as the path to the .java source ... Read More

How can we import data from a text file having names of the columns in first row?

Abhinaya

Abhinaya

Updated on 04-Feb-2020 05:52:05

338 Views

Sometimes, the input text file has the names of the columns in the first row and to import data from such kind of text file to MySQL table we need to use ‘IGNORE ROWS’ option. To illustrate it we are using the following example −ExampleFollowings are the comma separated values ... Read More

Usage of font-weight property in CSS

Abhinaya

Abhinaya

Updated on 30-Jan-2020 10:36:02

76 Views

The font-weight property is used to increase or decrease how bold or light a font appears. The font-weight property provides the functionality to specify how bold a font is. Possible values could be normal, bold, bolder, lighter, 100, 200, 300, 400, 500, 600, 700, 800, 900.                   This font is bold.       This font is bolder.       This font is 500 weight.    

Create a small-caps effect for CSS

Abhinaya

Abhinaya

Updated on 30-Jan-2020 09:25:02

402 Views

To create a small-caps effect, use the font-variant property.ExampleYou can try to run the following code to learn how to work with font-variant property in CSS:                            Asia, Antartica, Africa are continents          

Why MySQL uses the interval like 7 day and 2 hour instead of 7 days and 2 hours?

Abhinaya

Abhinaya

Updated on 29-Jan-2020 05:23:20

64 Views

The reason behind this concept is that MySQL requires the unit keywords to be singular, regardless of the English grammar rules. If we will try to supply intervals like 7 days, 2 hours etc then MySQL will produce syntax error as follows −mysql> Select '2017-02-25 05:04:30' + INTERVAL 2 days; ... Read More

Advertisements