Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
mysql

Featured

Stored Procedures and Functions in MySQL- Part 1

Why do we need stored routines? In this multi-part series I will explain the need of stored routines commonly know as stored procedures and functions , how to manage them, how to declare variables, programming blocks (loops, how to perform con...

How to create a trigger in MySQL

Many a times, we have come across a need that execution of DML statement on one database table should lead to modification in another table with some specific set of values. Whats the novice way to do? Simple, fire the first modification query th...

Top 10 MySQL queries every developer should know

As developers of any technology which uses MySQL as backend we always need to know some basic queries to work on. The list may vary as per the development need but a basic set still remains the same. The very first query that comes into use...

How to optimize and repair all databases and tabels in mysql?

Optimization of database tables in mysql is a methodology which must be done frequently to make your database healthy. As per mysql manual, OPTIMIZE TABLE should be used if you have deleted a large part of a table or if you have made ...

Change the collation of database, tables and columns

If we have added wrong collation name of the database and its columns the we can get some problem with other languages and special character. All other languages and characters will appear as ????? So we can alter collation of database and tabl...

How to test My SQL Injection

SQL injection attack can access the sensitive data from the database. The attacker can Insert, Update, Delete and execute the administration operation. Detection: Authentication Forms : When user enter the web form, chances are that the user...

Mysql Function To Rounding number to nearest 1,10,100,1000

Below is the Mysql Function To Rounding number to nearest 1,10,100,1000 DELIMITER $$ DROP FUNCTION IF EXISTS `rounding_to_nearest`$$ CREATE FUNCTION `rounding_to_nearest`(num decimal(15,2),round_to...

ERROR: Error 1005: Can't create table (errno: 121)

Sometimes we get this error on creating table in MySQL.This error will come when we use the constraint with the same name that is already used somewhere else. If the table you're trying to create includes a foreign key constraint, and you've p...

Indexes in MySQL

Indexes in MySQL can improve performance of specific queries Like as below Examples : Syntax for creating index on one field: CREATE INDEX indx_magrno ON EmplyeTable (EmplyeID); These two indexes is supposed to hugely improve performan...

How to enable slow query logs

For this we need to edit my.cnf file (This should be in /etc directory) we need to enter following lines :- log-slow-queries=/logs/mysql/slowQueries.log long_query_time=30 This time is in seconds , so if any query wi...

How to use regular expression in mysql query?

By using REGEXP function of mysql.Below is the example via a MySQL Query select empId,empName from tbl_employee where empName REGEXP [1-4]$; This will select the data of all employees whose name ends with either 1 or 2 or 3 or 4

Not able to add Foreign key on table column

Error Code : 1005 Can't create table 'DatabaseName.#sql-9cc_1' (errno: 150) (0 ms taken) After searching a lot i have got solution for the above problem while i was adding FK to a column. The error was because of different MySQL engine. The...

Difference between Decimal,Float,Double in terms of exact calculation

Difference between float,double and decimal in terms of exact calculation(Tested in mysql) I was creating an application where I need exact values from mysql procedure so I have to find better data type which gives me exact value so I tested i...
1 3 next
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: