Online services serve today’s basic needs of people in this modern internet era. This internet based services make use of huge volumes of data for their processing. Social media is another interaction media through which huge volumes of data is stored in a daily basis. These data has to be stored in databases. SQL queries provide means for accessing, modifying and retrieval of data from databases. If attacker finds way in modifying queries with unauthorized access, the evidence of data for future purposes is under danger. Such SQL injection attack is found to be predominant in web applications. Such an attack has to be mitigated and addressed soon for protecting the huge data. The survey reveals the importance of data and effects of SQL injection attack over data and its prevention techniques.