Click here to Skip to main content
16,016,227 members
Home / Discussions / Database
   

Database

 
Questionprior action plan to prevent sql database corruption Pin
Kar_Malay1-Sep-23 20:01
Kar_Malay1-Sep-23 20:01 
AnswerRe: prior action plan to prevent sql database corruption Pin
Richard Andrew x642-Sep-23 2:38
professionalRichard Andrew x642-Sep-23 2:38 
GeneralRe: prior action plan to prevent sql database corruption Pin
Dave Kreskowiak2-Sep-23 3:33
mveDave Kreskowiak2-Sep-23 3:33 
AnswerRe: prior action plan to prevent sql database corruption Pin
jschell4-Sep-23 5:42
jschell4-Sep-23 5:42 
GeneralRe: prior action plan to prevent sql database corruption Pin
Kar_Malay2-Oct-23 9:22
Kar_Malay2-Oct-23 9:22 
QuestionFetch row and display in frontend column Pin
Kesiena26-Aug-23 3:14
Kesiena26-Aug-23 3:14 
AnswerRe: Fetch row and display in frontend column Pin
David Mujica28-Aug-23 3:16
David Mujica28-Aug-23 3:16 
AnswerRe: Fetch row and display in frontend column Pin
jschell29-Aug-23 5:01
jschell29-Aug-23 5:01 
How depends on the database.

But typically an identity column. The table would have something like the following which is for SQL Server. Other databases all have something similar. Mongodb uses a 'object id' (typically.)

{code}
something_id INT IDENTITY(1,1) PRIMARY KEY,
{code}

That is how you create the column. But populating it in the other tables is more complicated.
1. You must first insert into the main table to create the id.
2. You must then get that id. That almost always involves using a specific form of the insert (first part) which returns the id at the same time as the insert occurs.
3. You then use that return value to create (insert) into the other tables. Obviously you will need to add a column to hold that new value.

You can google for examples of using the above.
AnswerRe: Fetch row and display in frontend column Pin
Rohan Saadat17-Nov-23 5:10
Rohan Saadat17-Nov-23 5:10 
QuestionMulti-user use the database at the same time Pin
Siavash.BRY11-Aug-23 23:49
Siavash.BRY11-Aug-23 23:49 
AnswerRe: Multi-user use the database at the same time Pin
Richard Deeming13-Aug-23 21:18
mveRichard Deeming13-Aug-23 21:18 
AnswerRe: Multi-user use the database at the same time Pin
Dave Kreskowiak14-Aug-23 5:12
mveDave Kreskowiak14-Aug-23 5:12 
AnswerRe: Multi-user use the database at the same time Pin
jschell14-Aug-23 6:37
jschell14-Aug-23 6:37 
QuestionTough one Pin
Richard Andrew x6431-Jul-23 4:59
professionalRichard Andrew x6431-Jul-23 4:59 
AnswerRe: Tough one Pin
Richard Deeming31-Jul-23 5:33
mveRichard Deeming31-Jul-23 5:33 
GeneralRe: Tough one Pin
Richard Andrew x6431-Jul-23 5:35
professionalRichard Andrew x6431-Jul-23 5:35 
QuestionWhy do some websites provide Demo for their premium html themes while the codes can be seen using inspection tool in chrome? Pin
Alex Dunlop11-Jul-23 6:30
Alex Dunlop11-Jul-23 6:30 
AnswerRe: Why do some websites provide Demo for their premium html themes while the codes can be seen using inspection tool in chrome? Pin
PIEBALDconsult11-Jul-23 6:01
mvePIEBALDconsult11-Jul-23 6:01 
QuestionORDER BY in UNION Pin
_Flaviu29-May-23 5:14
_Flaviu29-May-23 5:14 
AnswerRe: ORDER BY in UNION Pin
jschell29-May-23 6:15
jschell29-May-23 6:15 
GeneralRe: ORDER BY in UNION Pin
_Flaviu29-May-23 7:54
_Flaviu29-May-23 7:54 
AnswerRe: ORDER BY in UNION Pin
Richard Deeming29-May-23 21:37
mveRichard Deeming29-May-23 21:37 
AnswerRe: ORDER BY in UNION Pin
Richard Andrew x6431-May-23 2:41
professionalRichard Andrew x6431-May-23 2:41 
GeneralRe: ORDER BY in UNION Pin
_Flaviu13-Jun-23 8:28
_Flaviu13-Jun-23 8:28 
AnswerRe: ORDER BY in UNION Pin
Richard Andrew x6413-Jun-23 13:19
professionalRichard Andrew x6413-Jun-23 13:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.