Chandu yadav has Published 1163 Articles

Do underscores in a MySQL table name cause issues?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:24

661 Views

No, you won’t get any issues with underscores in a MySQL table name. You will get the issues with a dash in a MySQL table name.Here is the demo that does not have any issue with underscore with table names −_StudentTrackerDemoLet us see the same while creating a table. The ... Read More

How to round down to nearest integer in MySQL?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:24

338 Views

To round down to nearest integer, use FLOOR() function from MySQL. The syntax is as follows −SELECT FLOOR(yourColumnName) from yourTableName;Let us first create a table −mysql> create table FloorDemo -> ( -> Price float -> ); Query OK, 0 rows affected ... Read More

8085 Block movement without overlap

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:24

1K+ Views

In this program, we will see how to move blocks of data from one place to another.Problem StatementWrite 8085 Assembly language program to move a data block. The blocks are assumed to be non-overlapping. The block size is given, the block is starting from X and we have to move ... Read More

Biggest value from two or more fields in MySQL?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:24

75 Views

To know the biggest value from two or more fields, use the function GREATEST() from MySQL.The syntax is as follows −SELECT GREATEST(MAX(yourColumnName1), MAX(yourColumnName2), ...............MAX(yourColumnName2) ) from yourTableName;Let us understand the above concept by creating a table with more than two columns −mysql> create table GreatestOfTwoOrMore -> ( ... Read More

Is there a way to know your current username in MySQL?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:24

7K+ Views

Yes, you can use the method CURRENT_USER() to know the current username in MySQL.The above method returns the username that can be used to authenticate the client connection.The query is as follows −mysql> select CURRENT_USER();The following is the output −+----------------+ | CURRENT_USER() | +----------------+ | root@% ... Read More

How to Counting Chars in EditText Changed Listener in Android?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:24

841 Views

Some situations, we have to restrict an edit text for some characters. To solve this situation, in this example demonstrate how to Counting Chars in Edit Text Changed Listener.Step 1 - Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to ... Read More

How to change the default charset of a MySQL table?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:24

708 Views

To change the default charset of a MySQL table, you can use the below syntax. The syntax is as follows −alter table yourTableName convert to character set yourCharsetName;Let us create a table and apply the above syntax to change the default charset. The query to create a table −mysql> create ... Read More

Fetch elements of Java TreeSet using Iteration

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:24

97 Views

Use Iterator class to fetch elements of TreeSet.Create a TreeSet and add elements to itTreeSet set = new TreeSet(); set.add("13"); set.add("11"); set.add("12"); set.add("16"); set.add("19"); set.add("23"); set.add("21"); set.add("20"); set.add("30");Now, to display the elements, use Iterator classIterator i = set.iterator(); while(i.hasNext()){ System.out.println(i.next()); }The following is an example that fetch ... Read More

Converting a date in MySQL from string field?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:24

131 Views

To convert string to date in MySQL, you can use STR_TO_DATE() function. The syntax is as follows −select str_to_date(‘StringValue’, '%d, %m, %Y') as anyVariableName;Apply the above syntax in the following query wherein, we have a string value −mysql> SELECT STR_TO_DATE('26, 11, 2018', '%d, %m, %Y');The following is the output −+--------------------------------------+ ... Read More

NavigableMap pollFirstEntry() method in Java

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:24

60 Views

The pollFirstEntry() method in NavigableMap remove and return a key-value mapping associated with the least key in this mapThe following is an example to implement pollFirstEntry() methodExample Live Demoimport java.util.*; public class Demo { public static void main(String[] args) { NavigableMap n ... Read More

Advertisements