我有2個表,custlogin
和custinfo
:SQL Server存儲過程在多個表中插入一個
custlogin:
custid int primary key auto notnull
custusename varchar(25)
custpassword varchar(50)
custinfo:
custid foriegnkey custlogin.custid ondelete set NULL
custfirstname varchar(25)
custlastname varchar(25)
custaddress varchar(100)
我想寫一個存儲將插入到兩個表中的程序
更精確使用custusername custpassword插入custlogin,它將返回custid用作custinfo的外鍵。
我已經搜索了很多,但我沒有找到任何解決方案。
你對你自己的問題回答1分鐘後,因爲有人問?嗯...聞起來有點不對勁 – anatol