Click here to Skip to main content
15,849,678 members
Home / Discussions / Database
   

Database

 
GeneralRe: prior action plan to prevent sql database corruption Pin
Kar_Malay2-Oct-23 10:22
Kar_Malay2-Oct-23 10:22 
QuestionFetch row and display in frontend column Pin
Kesiena26-Aug-23 4:14
Kesiena26-Aug-23 4:14 
AnswerRe: Fetch row and display in frontend column Pin
David Mujica28-Aug-23 4:16
David Mujica28-Aug-23 4:16 
AnswerRe: Fetch row and display in frontend column Pin
jschell29-Aug-23 6:01
jschell29-Aug-23 6: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 6:10
Rohan Saadat17-Nov-23 6:10 
QuestionMulti-user use the database at the same time Pin
Siavash.BRY12-Aug-23 0:49
Siavash.BRY12-Aug-23 0:49 
AnswerRe: Multi-user use the database at the same time Pin
Richard Deeming13-Aug-23 22:18
mveRichard Deeming13-Aug-23 22:18 
AnswerRe: Multi-user use the database at the same time Pin
Dave Kreskowiak14-Aug-23 6:12
mveDave Kreskowiak14-Aug-23 6:12 
AnswerRe: Multi-user use the database at the same time Pin
jschell14-Aug-23 7:37
jschell14-Aug-23 7:37 
QuestionTough one Pin
Richard Andrew x6431-Jul-23 5:59
professionalRichard Andrew x6431-Jul-23 5:59 
AnswerRe: Tough one Pin
Richard Deeming31-Jul-23 6:33
mveRichard Deeming31-Jul-23 6:33 
GeneralRe: Tough one Pin
Richard Andrew x6431-Jul-23 6:35
professionalRichard Andrew x6431-Jul-23 6: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 7:30
Alex Dunlop11-Jul-23 7: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 7:01
mvePIEBALDconsult11-Jul-23 7:01 
QuestionORDER BY in UNION Pin
_Flaviu29-May-23 6:14
_Flaviu29-May-23 6:14 
AnswerRe: ORDER BY in UNION Pin
jschell29-May-23 7:15
jschell29-May-23 7:15 
GeneralRe: ORDER BY in UNION Pin
_Flaviu29-May-23 8:54
_Flaviu29-May-23 8:54 
AnswerRe: ORDER BY in UNION Pin
Richard Deeming29-May-23 22:37
mveRichard Deeming29-May-23 22:37 
AnswerRe: ORDER BY in UNION Pin
Richard Andrew x6431-May-23 3:41
professionalRichard Andrew x6431-May-23 3:41 
GeneralRe: ORDER BY in UNION Pin
_Flaviu13-Jun-23 9:28
_Flaviu13-Jun-23 9:28 
AnswerRe: ORDER BY in UNION Pin
Richard Andrew x6413-Jun-23 14:19
professionalRichard Andrew x6413-Jun-23 14:19 
GeneralRe: ORDER BY in UNION Pin
_Flaviu14-Jun-23 10:29
_Flaviu14-Jun-23 10:29 
GeneralRe: ORDER BY in UNION Pin
Richard Andrew x6414-Jun-23 14:00
professionalRichard Andrew x6414-Jun-23 14:00 
AnswerHow about a Temp table Pin
David Mujica6-Jun-23 4:40
David Mujica6-Jun-23 4:40 
GeneralRe: How about a Temp table Pin
jschell6-Jun-23 5:59
jschell6-Jun-23 5:59 

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.