Lakshmi Srinivas has Published 287 Articles

How Are MySQL INSTR() and LIKE operator similar?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 20-Jun-2020 10:54:47

707 Views

We can use both INSTR() function and LIKE operator to search or match a particular pattern and they return same result. It can be demonstrated from the following example of ‘Student’ table.ExampleSuppose we want to search name, which contains ‘av’ in it, from ‘Student’ table. We can use INSTR() function ... Read More

How can we delete multiple rows from a MySQL table?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 20-Jun-2020 07:31:13

7K+ Views

We can use DELETE statement along with a WHERE clause, which identifies those multiple rows, to delete multiple rows from MySQL table.Examplemysql> Select * from names; +------+-----------+ | id   | name      | +------+-----------+ | 1    | Rahul     | | 2    | Gaurav   ... Read More

What are the different ways to maintain data integrity in child table when the record is deleted in parent table?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 19-Jun-2020 13:26:49

328 Views

When two tables are connected with Foreign key and data in the parent table is deleted, for which record exists in child table too, then followings are the ways to maintain data integrity −On Delete CascadeThis option will remove the record from child table too if that value of the ... Read More

How can we remove NOT NULL constraint from a column of an existing MySQL table?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 19-Jun-2020 11:29:02

7K+ Views

We can remove a NOT NULL constraint from a column of an existing table by using the ALTER TABLE statement.ExampleSuppose we have a table ‘test123’ having a NOT NULL constraint on column ‘ID’ as follows −mysql> DESCRIBE test123; +-------+---------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | ... Read More

How to put comments inside a Python dictionary?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 17-Jun-2020 11:46:03

609 Views

You can put comments like you normally would anywhere in a python script. But note that you can only put single line comments using #. Multiline comments act like strings and you cannot put just a string in between definition of a dict. For example, the following declaration is perfectly ... Read More

How to create and populate Java array of Hash tables?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 16-Jun-2020 09:52:15

627 Views

One way to create an array of hash tables is to create Hashtable objects and to assign these to a Hashtable array using curly braces:ExampleLive Demoimport java.util.Hashtable; public class HashTableOfArrays {    public static void main(String args[]) {       Hashtable ht1 = new Hashtable();       ... Read More

How to draw a circular gradient in HTML5?

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 15-Jun-2020 11:43:34

259 Views

This method returns a CanvasGradient object that represents a radial gradient that paints along the cone given by the circles represented by the arguments. The first three arguments define a circle with coordinates (x1, y1) and radius r1 and the second a circle with coordinates (x2, y2) and radius r2.createRadialGradient(x0, ... Read More

Hide content depending on screen size with Bootstrap

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 12-Jun-2020 22:06:19

641 Views

Use the .hidden-* class in Bootstrap to hide content depending on screen size with BootstrapExampleLive Demo           Bootstrap Example                                 This is visible.       This is hidden.       Hidden on small screen       Hidden on medium screen    

Add plain text next to a form label within a form with Bootstrap

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 12-Jun-2020 21:43:27

538 Views

To add plain text to a form label within a form, use the .form-control-static in Bootstrap.You can try to run the following code to implement a .form-control-static class in BootstrapExampleLive Demo           Bootstrap Example                                                       Email:                            amit@demo.com                                

Add the default styles for the dropdown menu container in Bootstrap

Lakshmi Srinivas

Lakshmi Srinivas

Updated on 12-Jun-2020 21:25:14

217 Views

Use the .dropdown-menu class in Bootstrap to add the default styles for the dropdown menu containerExampleLive Demo           Bootstrap Example                                          Mobile Phones          The following are the mobile phone brands available in India:                       Companies                                            Apple                Samsung                Oppo                Nokia                                

Previous 1 ... 6 7 8 9 10 ... 29 Next
Advertisements