MySQL custom row number in a result set
You can add a sequential number as a custom row number of a row using SET clause and increment at next row. Suppose users table has columns name and age. When you want to show the […]
You can add a sequential number as a custom row number of a row using SET clause and increment at next row. Suppose users table has columns name and age. When you want to show the […]
When you assign one field as a primary key you can use auto-increment attribute to that field. It generates unique identity for the row inserting a unique auto increment value. You can also reset auto […]
A database view is a virtual table which is defined as a SQL select query with JOIN statement. Same as database table it consists of rows and columns. When any data of a tables changes, […]
Using ng-view and ng-template directives and $routeProvider services you can provide single page application via multiple views on a single page. ng-view: A place holder where a corresponding view can be placed. ng-template: Used to […]
To maintain MySQL Database tables efficiently you need to analysis, optimize, check and repair database tables frequently. Tips for Maintaining MySQL Database Tables: Analyze table: analyze the table for optimize. ANALYZE TABLE table_name; Optimize table: […]
Here you will learn how to manage triggers like modifying, removing etc. To display the trigger use following sql: SELECT * FROM Information_Schema.Triggers WHERE Trigger_schema = ‘database_name’ AND Trigger_name = ‘trigger_name’; To view trigger: SHOW […]
In MySQL you can add an event to a database that runs in a interval to automate database tasks. You can wait for intervals and check the table to see the changes. By default, the […]
Using CREATE TRIGGER statement you can create a trigger. You have to put the trigger name after the trigger statement. Let’s see an example of Create Trigger: For example we have two tables i.e. users […]
MySQL triggers are nothing but a SQL statement stored in the database. When any event associate with a table is fired i.e. insert, update or delete a trigger is executed. TRUNCATE statement delete the all […]
Using jQuery you can search and highlight text within a div from array of elements and wrap a highlight span around each word. Example to search and highlight text: <script type=”text/javascript”> var regex = /(Rubbish|Like|Rough|Raw|Doggie|Billy)/ig; $(‘#divID’).each(function() […]