Lakshmi Srinivas

Lakshmi Srinivas

233 Articles Published

Articles by Lakshmi Srinivas

Page 16 of 24

How to delete useless images in your whatsapp automatically

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 06-Jul-2020 3K+ Views

Probably WhatsApp is the most memory-consuming instant messenger today. As if Good Morning messages with hot cup of coffee and a croissant or some chirping bird were insufficient, the enthusiasts are creating and sending messages for greeting “Good Afternoon” and “Good Night” too. These images and other media files start accumulating in chunks especially if you have a setting of Auto Download. These useless images eat up large space of our mobile devices leave very little space for their smart use. At times they also slow down the device performance. At some point of time it becomes very annoying.The simplest ...

Read More

What are Pure HTML export buttons in jQuery Data Table?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 24-Jun-2020 227 Views

jQuery Data Table provides export buttons with the help of which we can make a structure like the following −Export PDFExport CSVExport HTMLExport ExcelFor this, we need to write code −var tbl = $('#extable').DataTable({      dom: 'export',        buttons: [          {                 extend: 'collection',                 text: 'Export',                 buttons: [ 'csvHtml5', ' pdfHtml5', 'copyHtml5', 'excelHtml5' ]          }        ] });

Read More

What is MySQL GENERATED COLUMN and how to use it while creating a table?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 22-Jun-2020 1K+ Views

Basically generated columns are a feature that can be used in CREATE TABLE or ALTER TABLE statements and is a way of storing the data without actually sending it through the INSERT or UPDATE clause in SQL. This feature has been added in MySQL 5.7. A generated column works within the table domain. Its syntax would be as follows −Syntaxcolumn_name data_type [GENERATED ALWAYS] AS (expression) [VIRTUAL | STORED] [UNIQUE [KEY]]Here, first of all, specify the column name and its data type.Then add the GENERATED ALWAYS clause to indicate that the column is a generated column.Then, indicate whether the type of ...

Read More

How can we see the metadata of a view(s) stored in a particular MySQL database?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 22-Jun-2020 288 Views

The INFORMATION_SCHEMA database has a VIEWS table that contains view metadata i.e. data about views. To illustrate it we are taking the example of a view named ‘Info’.ExampleThe following query will show the metadata of a view named ‘Info’ −mysql> SELECT * from INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME = 'Info' AND TABLE_SCHEMA = 'query'\G *************************** 1. row *************************** TABLE_CATALOG: def TABLE_SCHEMA: query TABLE_NAME: info VIEW_DEFINITION:select`query`.`student_info`.`id`AS`ID`, `query`.`student_info`.`Name` AS `NAME`, `query`.`student_info`.`Subject` AS `SUBJECT`, `query`.` student_info`.`Address` AS `ADDRESS` from `query`.`student_info` CHECK_OPTION: NONE IS_UPDATABLE: YES ...

Read More

What are the different privileges required for using views?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 22-Jun-2020 219 Views

Following privileges are required for a different kind of CREATE, REPLACE, DROP, ACCESS, UPDATE etc. of usage of views − CREATE VIEW Privilege − CREATE VIEW privilege is required to create a view. Along with this we must have sufficient privileges, like SELECT, INSERT or UPDATE, for accessing the tables to which the view definition refers. DROP VIEW Privilege − We require DROP VIEW privileges for using OR REPLACE clause, DROP VIEW statement and also for using ALTER VIEW statement. SELECT Privilege − We must have SELECT privileges for selecting from a view. INSERT, DELETE or UPDATE Privileges − Actually ...

Read More

How can we create a MySQL one-time event that executes immediately?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 22-Jun-2020 965 Views

As we know a one-time event means the events that will be executed only once on a particular schedule. To illustrate the creation of such kind of events we are using the following example in which we are creating an event which will execute at the current time −Examplemysql> Create table event_message(ID INT NOT NULL PRIMARY KEY AUTO_INCREMENT, MESSAGE VARCHAR(255) NOT NULL, Generated_at DATETIMENOT NULL); Query OK, 0 rows affected (0.61 sec) mysql> CREATE EVENT testing_event ON SCHEDULE AT CURRENT_TIMESTAMP DO INSERT INTO event_message(message, generated_at) Values('Hello', NOW()); Query OK, 0 rows affected (0.00 sec) mysql> Select * from ...

Read More

How can we get some last number of characters from the data stored in a MySQL table's column?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 22-Jun-2020 208 Views

To get some last number of characters from the data stored in MySQL table’s column, we can use MySQL RIGHT() function. It will return the number of characters specified as it argument. We need to provide the name of the column, having the particular record from which we want to get last characters, as its first argument. To demonstrate it we are taking the example of a table named ‘examination_btech’ having the following examination details of students −mysql> Select * from examination_btech; +-----------+----------+--------+ | RollNo | Name | Course | +-----------+----------+--------+ | 201712001 ...

Read More

How MySQL evaluates if I try to add two numbers that are contained in quotes?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 20-Jun-2020 152 Views

If we are trying to add two numbers that are contained in quotes, means we are treating the string as a number. In this case, MySQL converts the value into the closet numeric equivalent and evaluates the result. Following example will demonstrate it.Examplemysql> Select '1525' + '200'As Total; +-------+ | Total | +-------+ | 1725 | +-------+ 1 row in set (0.00 sec)

Read More

When MySQL SUBSTRING_INDEX() function returns the same string, provided in the argument, as output?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 20-Jun-2020 236 Views

MySQL SUBSTRING_INDEX() function will return the same string as output if the argument ‘count’ has the value greater than the total number of occurrences of delimiter. It can be demonstrated with the following example −mysql> Select SUBSTRING_INDEX('www.google.co.in','.',4); +-------------------------------------------+ | SUBSTRING_INDEX('www.google.co.in','.',4) | +-------------------------------------------+ | www.google.co.in                          | +-------------------------------------------+ 1 row in set (0.00 sec)The above query returns the same string because 4 is greater than the total number of occurrences of delimiter provided as argument i.e. ‘.’.

Read More

How Are MySQL INSTR() and LIKE operator similar?

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 20-Jun-2020 835 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 as follows −mysql> Select Name from student where INSTR(name, 'av') > 0; +--------+ | Name   | +--------+ | Gaurav | | Aarav  | | Gaurav | +--------+ 3 rows in set (0.00 sec)Now, for the same kind of search we can use LIKE operator as follows −mysql> Select Name ...

Read More
Showing 151–160 of 233 articles
« Prev 1 14 15 16 17 18 24 Next »
Advertisements