Skip to main content

Posts

Showing posts from November, 2024

SQL kya hai?

  1. SQL kya hai? Jawaab: SQL ka full form hai "Structured Query Language". Yeh ek aisi language hai jisse hum computer ko bol sakte hain ke database (jaise ek badi kitaab ya register jisme data hota hai) se kuch information nikaale, badle, ya naye data ko store kare. SQL zyada tar database manage karne ke liye use hoti hai, jaise MySQL aur SQL Server. 2. Primary Key kya hoti hai? Jawaab: Primary Key ek aisa khaas column hota hai jo table ke har record ko unique banata hai, yaani har row alag hoti hai. Yeh key kabhi repeat nahi hoti aur NULL bhi nahi hoti. Jaise ek class mein har student ka alag roll number hota hai, waise hi Primary Key ek unique ID banati hai. 3. SQL mein Joins kya hote hain? Aur inke types batao. Jawaab: Joins ka kaam do ya zyada tables ke records ko jodna hota hai. Jaise ek table mein students ke naam hain aur doosri mein unke marks, toh join se dono tables ke data ko ek saath dekh sakte hain. INNER JOIN: Sirf wahi rows lata hai jo dono tables mein m...

SQL Injection kese kaam krta he🤔

 SQL Injection ek technique hai jo attacker ko ek database mein unauthorized access ya manipulation karne ka moka deti hai. Yeh tab hota hai jab koi application user ke input ko SQL query mein directly use karti hai bina us input ko sanitize kiye. Aise mein, agar attacker apne input mein malicious SQL code inject kar de, toh woh database ke data ko access, modify, delete ya manipulate kar sakta hai. Kaise Kaam Karta Hai Vulnerable Input Field : Jab kisi website mein koi input field ho (jaise username ya password), aur woh input directly SQL query mein bina sanitize kiye use ho, toh woh vulnerable hoti hai. SQL Query Manipulation : Attacker usually input ke sath SQL syntax add karta hai, jo existing query ko manipulate karti hai. Example: sql SELECT * FROM users WHERE username = 'user' AND password = 'password' ; Agar attacker username field mein user' OR '1'='1 daal de, toh query kuch aise ban jayegi: sql SELECT * FROM users WHERE username ...