How can we take a backup of the single database by using mysqldump client program?

varma
Published on 20-Feb-2018 14:41:29
By using mysqldump client program we can take the backup of a database into a file having the extension ‘.sql’. it can be understood with the help of following example −ExampleIn this example, with the help of mysqldump client program, we are taking the backup of a database named ‘tutorials’ ... Read More

How can we import CSV files into MySQL tables by using mysqlimport?

Rishi Rathor
Published on 20-Feb-2018 14:37:28
For importing CSV files into MySQL table we must have a CSV file i.e. a file having comma-separated values in it. Then we must have a MySQL table with the same name and structure. To illustrate it we are taking the following example −ExampleFor example, we have Address.CSV file having ... Read More

In MySQL, how can we check whether a string of a specified pattern is not present within another string?

Ankith Reddy
Published on 20-Feb-2018 14:40:39
We can check whether a string of specified pattern is not present within another string by using NOT LIKE operator along with wildcard characters.SyntaxNOT LIKE specific_patternSpecific_pattern is the pattern of string we do not want to find out within another string.ExampleSuppose we have a table named ‘student’ having names of ... Read More

What are some frequently used mysqlimport options while uploading the data into MySQL table through command line?

usharani
Published on 20-Feb-2018 14:37:30
mysqlimport can be run with a number of options. Followings are some options for mysqlimport and their effect on import.OptionAction-r or –replaceCause imported rows to overwrite existing rows if they have the same unique key value.-i or –ignoreIgnore rows that have the same unique key value as existing rows.-f or ... Read More

What is the significant difference between MySQL LIKE and equal to (=) operator?

Sharon Christine
Published on 20-Feb-2018 14:38:21
We have seen the MySQL SELECT command to fetch data from the MySQL table. We can also use a conditional clause called as the WHERE clause to select the required records.A WHERE clause with the ‘equal to’ sign (=) works fine where we want to do an exact match. Like ... Read More

How can we extract a substring from the value of a column in MySQL table?

Manikanth Mani
Published on 20-Feb-2018 14:37:32
We can apply any of the functions like SUBSTRING(), MID() or SUBSTR() to extract a substring from the value of a column. In this case, we must have to provide the name of the column as the first argument of the function i.e. at the place of string we have ... Read More

How can we upload data into multiple MySQL tables by using mysqlimport?

varun
Published on 20-Feb-2018 14:25:41
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

In what cases, we cannot use MySQL TRIM() function?

Arjun Thakur
Published on 20-Feb-2018 14:30:47
Actually for using MySQL TRIM() function we must have to know the string which we want to trim from the original string. This becomes the major drawback of TRIM() in the cases where we want to trim the strings having different values. For example, suppose we want to get the ... Read More

How can we upload data into MySQL tables by using mysqlimport?

Prabhas
Published on 20-Feb-2018 14:19:15
For uploading the data into MySQL tables by using mysqlimport we need to follow following steps −Step-1 − Creating the tablefirst of all, we need to have a table in which we want to upload the data. We can use CREATE TABLE statement for creating a MySQL table. For example, ... Read More

How can we extract a substring from a string in MySQL?

Samual Sam
Published on 20-Feb-2018 14:29:33
MySQL SUBSTRING() function can be used to extract a substring from a string. Basically SUBSTRING() returns a substring with a given length from a string starting at a specific position. It has various forms as follows −SUBSTRING(str, pos)SUBSTRING(str FROM pos)SUBSTRING(str, pos, len)SUBSTRING(str FROM pos FOR len)The forms without a len ... Read More
Advertisements