Create a New Database Using mysqladmin

vanithasree
Updated on 20-Jun-2020 13:40:02

211 Views

We would need special privileges to create or to delete a MySQL database. Following is the syntax for creating a new database using mysqladmin binary −Syntax[root@host]# mysqladmin -u root -p create db_name Enter password:******Here, db_name is the name of the database we want to create.ExampleFollowing is a simple example to create a database called TUTORIALS −[root@host]# mysqladmin -u root -p create TUTORIALS Enter password:******The above query will create a MySQL database called TUTORIALS.

Distinguish Between MySQL IFNULL and NULLIF Functions

karthikeya Boyini
Updated on 20-Jun-2020 13:38:38

3K+ Views

Actually, both MySQL IFNULL() and NULLIF() functions are having an almost same syntax as given below −The syntax of IFNULL()IFNULL(expression1, expression2)The syntax of NULLIF()NULLIF(expression1, expression2)They can be distinguished in the way they return the first argument as result. IFNULL() function will return the first argument as a result if it is not NULL and NULLIF() function will return the first argument as a result if both the arguments are not same.mysql> Select IFNULL('Ram', 'Shyam'); +-----------------------+ | IFNULL('Ram', 'Shyam') | +-----------------------+ | Ram                   | +-----------------------+ 1 row in set (0.00 sec) mysql> Select ... Read More

CSS word-wrap Property

Srinivas Gorla
Updated on 20-Jun-2020 13:37:17

271 Views

The word-wrap property is used to break the line and wrap onto next line.ExampleThe following shows sample syntax −Live Demo                    div {             width: 200px;             border: 2px solid #000000;          }          div.b {             word-wrap: break-word;          }                     word-wrap: break-word property       ThisisdemotextThisisdemotext:       thisisaveryveryveryveryveryverylongword. The long word wraps to       the next line.     Output

CSS Text Emphasis Property

varun
Updated on 20-Jun-2020 13:29:47

144 Views

Used to emphasis text and color. Let us see an example:text-emphasis: text-emphasis-style text-emphasis-color;Here,text-emphasis-color: foreground color of the emphasis marktext-emphasis-style: emphasis marks on the element's text

What is Finally Statement in C#

Samual Sam
Updated on 20-Jun-2020 13:24:44

382 Views

The final block is used to execute a given set of statements, whether an exception is thrown or not thrown. For example, if you open a file, it must be closed whether an exception is raised or not.The error handling blocks are implemented using the try, catch, and finally keywords.ExampleYou can try to run the following code to implement finally statement −using System; namespace ErrorHandlingApplication {    class DivNumbers {       int result;       DivNumbers() {          result = 0;       }       public void division(int ... Read More

CSS Box Shadow

Arjun Thakur
Updated on 20-Jun-2020 13:24:40

280 Views

The CSS box-shadow property is used to add shadow effects to elements. The following is an example to add a box shadowExampleLive Demo                    div {             width: 300px;             height: 100px;             padding: 15px;             background-color: red;             box-shadow: 10px 10px;          }                     This is a div element with a box-shadow     Output

Array IsFixedSize Property in C#

Chandu yadav
Updated on 20-Jun-2020 13:23:53

300 Views

The IsFixedSize property of ArrayList class is used to get a value indicating whether the ArrayList has a fixed size.The following is an example stating the usage of isFixedSize property −Example Live Demousing System; using System.Collections; class Demo {    public static void Main() {       ArrayList arrList = new ArrayList();       Console.WriteLine("Adding some numbers:");       arrList.Add(45);       arrList.Add(78);       Console.WriteLine(arrList.Count);       Console.WriteLine("myArrayList.IsFixedSize = " + arrList.IsFixedSize);     } }OutputAdding some numbers: 2 myArrayList.IsFixedSize = FalseAbove we have added an array list −ArrayList arrList ... Read More

Show TRUE and FALSE Values in MySQL Without BOOLEAN Data Type

Sharon Christine
Updated on 20-Jun-2020 13:23:30

220 Views

As we know that there is no BOOLEAN data type in MySQL hence by using TRUE or true, FALSE or false we can enter Boolean values in MySQL statement.Examplemysql> Select TRUE,FALSE; +------+-------+ | TRUE | FALSE | +------+-------+ |    1 |     0 | +------+-------+ 1 row in set (0.00 sec) mysql> Select true,false; +------+-------+ | TRUE | FALSE | +------+-------+ |    1 |     0 | +------+-------+ 1 row in set (0.00 sec)

Array IsReadOnly Property in C#

karthikeya Boyini
Updated on 20-Jun-2020 13:23:19

144 Views

The Array.IsReadOnly property gets a value indicating whether the Array is read-only.Firstly, set the array values −Array arr = Array.CreateInstance(typeof(String), 3); arr.SetValue("Electronics", 0); arr.SetValue("Clothing", 1);Now let’s use the IsReadOnly property to find whether the Array is read-only. If the array is read-only, then it cannot be updated −arr.IsReadOnlyThe following is the complete example stating the usage of Array.IsReadOnly property −Example Live Demousing System; using System.Collections.Generic; using System.Linq; using System.Text; namespace lower {    class Program {       static void Main(string[] args) {          Array arr = Array.CreateInstance(typeof(String), 3);          arr.SetValue("Electronics", 0);   ... Read More

How MySQL IF Function Works

Ankith Reddy
Updated on 20-Jun-2020 13:22:56

164 Views

MySQL IF() function is one of the MySQL control flow functions that returns a value based on a condition. It is sometimes referred to as IF ELSE or IF THEN ELSE function. Basically, it takes three expressions and if the first expression is true (not ZERO and not NULL), it returns the second expression. Otherwise, it returns the third expression. Its syntax is as follows −SyntaxIF(expr, value_if_true, value_if_false)Here expr is the expression having some condition.Value_if_true is the value to return if expr evaluates to TRUE.Value_if_false is the value to return if expr evaluates to FALSE.Examplemysql> Select IF(100=100, 'YES', 'NO'); +------------------------+ | ... Read More

Advertisements