Results 1 to 10 of 10

Thread: sql

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Hard Core Gaming HardDrive's Avatar
    Join Date: Jun:2006
    Location:
    Posts: 754

    sql

    2 : students grades.
    students - , , , ( )
    grades - id ( ), id na ( ), , , .

    , , . . ?
    grades students. , , .
    , .
    Last edited by HardDrive; 27th May 2011 at 22:27.
    Config: Ryzen 3700x / Gigabyte x570 Gaming X / RX480 Strix 1400@2250 / 2x8gb Corsair Vengeance / Seagate Barracuda 1Tb + 256gb OCZ Trion / SuperFlower Leadex II Gold 750w / BeQuiet B801 / LG 23MA53 + Philips 170c / Logitech G502 / CM QuickFire TK

    Acer Predator G9-593 I7 7700HQ + GTX1070

  2. #2
    Registered User
    Join Date: May:2011
    Location: BG
    Posts: 7
    students id grades. ?
    , .

    P.S. , . Stored procedure ?

  3. #3
    Hard Core Gaming HardDrive's Avatar
    Join Date: Jun:2006
    Location:
    Posts: 754
    .
    , , .
    Stored Procedure e , , .

    Code:
    alter table grades 
    DROP FOREIGN KEY rel2;
    
    update students s, grades g
    set g.stud_id='1100',
    s.fnum='1100',
    s.name='ppp',
    s.mname='zzz',
    s.fname='gogo'
    where s.fnum='33' and g.stud_id='33';
    
    alter table grades
    add constraint rel2 foreign key (stud_id) references Students(fnum);
    Config: Ryzen 3700x / Gigabyte x570 Gaming X / RX480 Strix 1400@2250 / 2x8gb Corsair Vengeance / Seagate Barracuda 1Tb + 256gb OCZ Trion / SuperFlower Leadex II Gold 750w / BeQuiet B801 / LG 23MA53 + Philips 170c / Logitech G502 / CM QuickFire TK

    Acer Predator G9-593 I7 7700HQ + GTX1070

  4. #4
    Registered User
    Join Date: May:2011
    Location: BG
    Posts: 7
    , - , .
    . .

  5. #5
    Hard Core Gaming HardDrive's Avatar
    Join Date: Jun:2006
    Location:
    Posts: 754
    , , .
    Config: Ryzen 3700x / Gigabyte x570 Gaming X / RX480 Strix 1400@2250 / 2x8gb Corsair Vengeance / Seagate Barracuda 1Tb + 256gb OCZ Trion / SuperFlower Leadex II Gold 750w / BeQuiet B801 / LG 23MA53 + Philips 170c / Logitech G502 / CM QuickFire TK

    Acer Predator G9-593 I7 7700HQ + GTX1070

  6. #6
    Registered User
    Join Date: Feb:2006
    Location: Plovdiv
    Posts: 392
    Quote Originally Posted by HardDrive View Post
    , , .
    - ( ( )) .

  7. #7
    ! vbTheKing's Avatar
    Join Date: Sep:2003
    Location:
    Posts: 4,138
    1. "" " " - . , .
    2. , . , , . , , primary key . . alter . , , , constraint- ? .
    3. PK FK , . - , - , - auto increment .
    4. . SQL . - .
    5. , ? , .
    6. MySQL :
    http://dev.mysql.com/doc/refman/5.1/...nstraints.html
    ON UPDATE CASCADE.
    ''? * *
    - !
    ...

  8. #8
    ****** koshera's Avatar
    Join Date: Sep:2003
    Location: Sammamish, WA, USA
    Posts: 1,507
    HardDrive, The daily wtf ... vbTheKing. . , .. . , / . , . .
    Thre are 10 kinds of people in this world - people who know binary, and those who don't.
    -, .

  9. #9
    Hard Core Gaming HardDrive's Avatar
    Join Date: Jun:2006
    Location:
    Posts: 754
    ><. "" , . !
    Config: Ryzen 3700x / Gigabyte x570 Gaming X / RX480 Strix 1400@2250 / 2x8gb Corsair Vengeance / Seagate Barracuda 1Tb + 256gb OCZ Trion / SuperFlower Leadex II Gold 750w / BeQuiet B801 / LG 23MA53 + Philips 170c / Logitech G502 / CM QuickFire TK

    Acer Predator G9-593 I7 7700HQ + GTX1070

  10. #10
    Registered User
    Join Date: Jul:2010
    Location: Sofia
    Posts: 142
    ON UPDATE CASCADE( -, ON DELETE CASCADE). 3 - students ( ), grades () students.
    PK ( sequence auto increment). Primary key-a , update , .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |