Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One take on ChatGPT
Message
From
19/02/2023 07:53:42
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
19/02/2023 07:23:35
General information
Forum:
Technology
Category:
Computers
Miscellaneous
Thread ID:
01686219
Message ID:
01686221
Views:
39
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform