AmitDiwan has Published 10744 Articles

MySQL query to get the last created table name (most recent)?

AmitDiwan

AmitDiwan

Updated on 05-Nov-2019 06:26:19

268 Views

You can use the concept INFORMATION_SCHEMA.TABLES for this. Let us first create a table. This would be our most recent table −mysql> create table DemoTable1323    -> (    -> FirstName varchar(10)    -> ); Query OK, 0 rows affected (0.43 sec)Insert some records in the table using insert command ... Read More

Create a MySQL table from already created table selecting specific rows?

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 11:11:01

175 Views

To create a table from an already created table, use CREATE TABLE AS SELECT statement. Let us first create a table −mysql> create table DemoTable1318 -> ( -> Id int, -> FirstName varchar(10), -> LastName varchar(10), -> Age int -> ); Query OK, 0 rows affected (0.50 sec)Insert some records ... Read More

CharEnumerator.GetHashCode() Method in C#

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 11:08:18

70 Views

The CharEnumerator.GetHashCode() method in C# returns a hash code for the current object.Syntaxpublic virtual int GetHashCode ();Let us now see an example to implement the CharEnumerator.GetHashCode() method −Exampleusing System; public class Demo {    public static void Main(){       string strNum = "john";       CharEnumerator ch ... Read More

Dictionary.Count Property in C#

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 11:05:31

482 Views

The Dictionary. Count property in C# gets the number of key/value pairs in the Dictionary.syntaxpublic int Count { get; }Let us now see an example to implement the Dictionary. Count property −Exampleusing System; using System.Collections.Generic; public class Demo {    public static void Main(){       Dictionary dict = ... Read More

How do I return multiple results in a MySQL subquery with IN()?

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 10:59:21

351 Views

In MySQL, you can easily return multiple results, but also achieve this with subquery using IN(). Let us first create a table −mysql> create table DemoTable1317 -> ( -> Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> Name varchar(20) -> ); Query OK, 0 rows affected (0.49 sec)Insert some records ... Read More

Char.TryParse() Method in C#

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 10:59:21

455 Views

The Char.TryParse() method in C# is used to convert the value of the specified string to its equivalent Unicode character.Syntaxpublic static bool TryParse (string str, out char res);Let us now see an example to implement the Char.TryParse () method −Exampleusing System; public class Demo {    public static void Main(){ ... Read More

Char.ToUpperInvariant(Char) Method in C#

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 10:57:49

210 Views

The Char.ToUpperInvariant() method in C# is used to convert the value of a Unicode character to its uppercase equivalent using the casing rules of the invariant culture.Syntaxpublic static char ToUpperInvariant (char ch);Above, the parameter ch is the Unicode character to convert.Let us now see an example to implement the Char.ToUpperInvariant() ... Read More

Select words from a text already in a MySQL table

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 10:56:56

295 Views

Let us first create a table −mysql> create table DemoTable1316 -> ( -> Value varchar(40) -> ); Query OK, 0 rows affected (0.47 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1316 values('MySQL'); Query OK, 1 row affected (0.16 sec) mysql> insert into DemoTable1316 values('Java'); Query ... Read More

Math.Log10() Method in C#

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 10:55:43

381 Views

The Math.Log10() method in C# is returned to the base 10 logarithms of a specified number.Syntaxpublic static double Log10 (double val);Here, Val is the number whose logarithm we want.The Log10() method returns −Val parameterReturnsPositiveThe base 10 log of d; that is, log 10d.ZeroNegativeInfinityNegativeNaNEqual to NaNNaNEqual to PositiveInfinityPositiveInfinityLet us now see ... Read More

MySQL query to convert empty values to NULL?

AmitDiwan

AmitDiwan

Updated on 04-Nov-2019 10:55:35

1K+ Views

It’s easy to convert empty values to NULL using SET and WHERE. Let us first create a table −mysql> create table DemoTable1315 -> ( -> CountryName varchar(10) -> ); Query OK, 0 rows affected (0.60 sec)Insert some records in the table using insert command. We have set some empty values ... Read More

Advertisements