W3School se to me ye sb parh chuka hu jo topics ha is me , mjhe syntax and functions sb pata ha kaise use hoge bt hard queries nia likh pata for exp select last record from table
W3School se to me ye sb parh chuka hu jo topics ha is me , mjhe syntax and functions sb pata ha kaise use hoge bt hard queries nia likh pata for exp select last record from table
acha ap yeh batao k ap ko sql k function hy.. jese max, min etc aur sql k syntax jese order by, group by etc and condition like where etc ka idea hy??
ap jo pouch rahe hy k kese sab se aakhri row hum select karenge... yeh cheze usi waqt possible hy (is query se jo me de raha hou) jab hamare pas index ho... jo automatic generate horaha ho.... then you can make this query like
select top 1 * from temp order by ID desc; ------------------ (1)
idhar top 1 se muraad pehla record hy upper se jo b aaye...
yaani select top 1 * from temp;
karenge to woh pehla record le kar aayega...
lekin aagey ki condition ki wajah se jo hum ne query 1 me di hy... us se haamra last record pehla ban jayega woh kese?? Order by ek syntax hy jis ka kaam yeh houta hy k woh jis feild par lag jaye to poura table order me aajata hy.... ab idhar ID ek field hy jis me 1 se le kar 100 ya 1000 ya is se b ziyada k input diye gaye hy... to jab order by karenge to woh in sab ko order me le ayega.... suppose karo k woh pehle se hi order me hy... to hamara last record 100 houga... to aakhir me hum ne desc lagaya hy (desc=descending) to is lihaaz se 100 record sab se pehle aajayega... u hamari sab se aakhri record hum access kar sakte hy....
sir ap ne bohat acha selsla shro kiya hay. Allah ap ko es ka sela day. aik waqt main mujhay vb seekhnay ka bohat shoq tha leken es main kuch problem paish aye jes ke waja se os ko chor dia.
g mjhe in sb ka idea ha . ye query b me likh leta hu bt complex queries me masla hota ha .
meri koshish to yehi hy k me sab k kaam aaou par yaha aisa nai lag raha
kyun k me time nai nikaal pata aur dosri taraf log yeh smjh rahe hy k me ne har kisi k liye kiya hy... halaan k jo log nai jante is baare me un ko batane me waqt lagta hy... aur itna waqt me nai de skataa.. filhaal.... kher idhar kuch log hy jinhe kuch kuch smjh hy... Allah kare k me in ki madad kar hi lou... aameen
acha to phir ap ko kaha problem aarahi hy?? me kuch cheezein batata hou ta k ap in me se kisi ki nishand dahi kar lo..
1. Store procedure
2. table joining like join keyword...
3. condition wagera..
4. primary key foreign key concept
aur b cheezein hy ab ap bataoge nai to me kese smjhounga??
ya phir ap yeh kehna chah rahe hounge k kese hum bari bari queries likhte hy??
ya phir kuch aur??????? ab mjhe jab tak pata nai chalega me kese bata sakta hou?? ap kuch example de dein me koshish karounga..
G bari queries kaise likhte ha is me masla ha and joining sai nai ati mjhe
acha to is k liye ap pehle join seekho.
me ne ap ko ek link diya hy is me se parhne ki koshish karo.
join example
agar smjh naa aaye to mjh se poch lenaa..
Thanks , agaya samjh join kaise use hoga.
ok
Bookmarks