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
Drag to reposition
Contributed Answers

How to apply Substring() for fields in MySQL to get part of string?

Answered on 3rd May, 2019, 0 Views

You can use substring() for fields in MySQL to get part of string. Following is the syntax − , Let us first create a table − , Insert records in the table using insert command − , Display all records from the table using select statement − , This will produce the following output − , Following is the query to use substring() method for fields − , This wil.....

Get MAX and MIN values along with their row id in MySQL?

Answered on 3rd May, 2019, 0 Views

You can use aggregate function MAX() and MIN() for this. Let us first create a table − , Insert records in the table using insert command − , Display all records from the table using select statement − , This will produce the following output − , Following is the query to get MAX and MIN values along with their row id − , This will produce the following output .....

Order by selected record in MySQL?

Answered on 3rd May, 2019, 0 Views

You can use a CASE statement for this. Let us first create a table − , Insert records in the table using insert command − , Display all records from the table using select statement. The query is as follows − , This will produce the following output − , Following is the query to order by selected record in MySQL − , This will produce the following output − ,

Order By date ASC in MySQL?

Answered on 3rd May, 2019, 0 Views

You can use STR_TO_DATE() function. Let us first create a table − , Insert records in the table using insert command − , Display all records from the table using select statement − , This will produce the following output − , Following is the query to sort order by date ASC − , This will produce the following output − ,

How to generate 6-digit random number in MySQL?

Answered on 3rd May, 2019, 0 Views

You can use LPAD() along with rand() and floor() to generate 6-digit random number. Let us first create a table − , Insert records in the table using insert command − , Display all records from the table using select statement − , This will produce the following output − , Following is the query to generate 6-digit random number in MySQL − , Let us display the .....

How to understand if a bigint is signed or unsigned in MySQL?

Answered on 3rd May, 2019, 0 Views

If you do not specify unsigned, then bigint will be signed. If you specify an unsigned, then bigint will be unsigned. Let us first create a table − , Insert records in the table using insert command − , Display all records from the table using select statement − , This will produce the following output − ,

How to search a word by capital or small letter in MySQL?

Answered on 3rd May, 2019, 0 Views

You can use BINARY along with the LIKE operator. Let us first create a table − , Insert records in the table using insert command − , Display all records from the table using select statement − , This will produce the following output − , Following is the query to search a word by the small letter − , This will produce the following output − , NOTE: If yo.....

How to get last 12 digits from a string in MySQL?

Answered on 3rd May, 2019, 0 Views

You can use RIGHT() function from MySQL to get the last 12 digits from a string. Let us first create a table − , Insert records in the table using insert command − , Display all records from the table using select statement − , This will produce the following output − , Following is the query to get last 12 digits from a string in MySQL − , This will produce th.....

Select last day of current year in MySQL?

Answered on 3rd May, 2019, 0 Views

In order to get last day of current year, you can use LAST_DAY() from MySQL. The syntax is as follows− , Let us implement the above syntax to know the last day of current year− , This will produce the following output − ,

IF() function in a MySQL Select statement?

Answered on 3rd May, 2019, 0 Views

The IF() function returns a value based on a condition. The syntax is as follows− , Insert records in the table using insert command − , Display all records from the table using select statement − , This will produce the following output − , Here is the query to implement IF() in MySQL − , This will produce the following output− ,

1 2 3 4 5 6 7 ... 110 Next
loader
Advertisements
Contribution

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