Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
One take on ChatGPT
Message
De
19/02/2023 07:53:42
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
19/02/2023 07:23:35
Information générale
Forum:
Technology
Catégorie:
Ordinateurs
Divers
Thread ID:
01686219
Message ID:
01686221
Vues:
40
>I guess that many type of jobs will disappear before ours because of all the directions we need to take creating our wonderfull apps :-)

My daughter is building a website. At some point she decided she needs the came-from field to track referrers, and decided it has to be unique and not nullable. Fine and easy, except what to do with the existing records. Can't have a default value, as it would be the same for all of the old records, therefore not unique. The regular way would be to create the field as nullable and not unique first, then populate it with random values for the old records, then add the constraints.

She decided to let ChatGPT solve that problem for her. Here's what it said:

„To resolve this issue, you need to provide a default value for the new "fs_uniquifier" column in the user table. You can do this by updating the existing records with some default value before running the ALTER TABLE statement to add the new column“.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform