Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint
Cover Image
Cover Image
Drag to reposition
Contributed Answers

Where is the MySQL table data stored in Windows?

Answered on 29th Apr, 2019, 0 Views

In order to know the location of MySQL table data, you can use the below syntax − , You can also use SHOW VARIABLES command for this. Following is the syntax − , Let us implement the above syntaxes to know where MySQL table stores data − , This will produce the following output − , Here is the alternate query to know where MySQL table data stored − , This will .....

How to export specific column data in MySQL?

Answered on 29th Apr, 2019, 0 Views

To export specific column data in MySQL, use OUTFILE − , Let us first create a table − , Insert records in the table using insert command − , Display records from the table using select command − , This will produce the following output − , Following is the query to export specific column data in MySQL − , The file location is ‘E:\StudentLastName.tx.....

Delete last 4 letters in MySQL?

Answered on 29th Apr, 2019, 0 Views

You can use SUBSTRING() along with UPDATE command to delete last 4 letters. Let us first create a table − , Insert some records in the table using insert command − , Following is the query to display all records from the table using select statement − , This will produce the following output − , Following is the query to delete last 4 letters − , Let us display.....

MySQL query to get sum of each column where every column has same number of values?

Answered on 29th Apr, 2019, 0 Views

You can use aggregate function SUM() for this. Let us first create a table − , Insert some records in the table using insert command − , Following is the query to display all records from the table using select statement − , This will produce the following output − , Here is the query to get the sum of each column where every column has same count of values − ,.....

How to alter the data type of a MySQL table’s column?

Answered on 29th Apr, 2019, 0 Views

You can use modify command for this. Let us first us create a table. , Now check the description of table. , This will produce the following output − , Here is the query to alter the data type from varchar to BIGINT − , Above, we have changed the column ‘StudentId’ datatype from varchar(200) to BIGINT(10). Let us check the description of table once again. , This will.....

How to check whether column value is NULL or having DEFAULT value in MySQL?

Answered on 29th Apr, 2019, 0 Views

You can use the concept of IFNULL() for this. Let us first create a table − , Insert records in the table using insert command − , Following is the query to display all records from the table using select statement − , This will produce the following output − , Following is the query to check whether column value is NULL or having DEFAULT value in MySQL. , This will .....

How to convert string to bitset in MySQL?

Answered on 29th Apr, 2019, 0 Views

To convert string to bitset, use the CONV() method. Let us first create a table − , Insert some records in the table using insert command − , Following is the query to display all records from the table using select statement − , Following is the output that displays blank result because the type is bitset − Following is the query to convert string to bitset and dis.....

How to set time data type to be only HH:MM in MySQL?

Answered on 29th Apr, 2019, 0 Views

You can use DATE_FORMAT() to set time data type to be only HH:MM.  Following is the syntax − , Let us first create a table − , Insert records in the table using insert command − , Following is the query to display all records from the table using select statement − , This will produce the following output − , Here is the query to set only HH:MM in MySQL da.....

Perform complex MySQL insert by using CONCAT()?

Answered on 29th Apr, 2019, 0 Views

To perform complex MySQL insert, you can use CONCAT() function. Let us see an example and create a table with StudentId and StudentFirstName. After that, complex MySQL insert will be performed and 'Web Student’ text will get inserted for every value and unique StudentId will get concatenated. The query to create first table is as follows − , Insert some records in the table usin.....

How to order last 5 records by ID in MySQL

Answered on 29th Apr, 2019, 0 Views

You can use subquery for this. Let us first create a table − , Insert some records in the table using insert command − , Following is the query to display all records from the table using select statement − , This will produce the following output − , Here is the query to get last 5 records ordered by ID − , This will produce the following output − ,

loader
Advertisements
Contribution

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.