Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Default value in existing schema

Avatar

Avatar
Validate 10
Level 3
Partha18
Level 3

Likes

19 likes

Total Posts

29 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
Partha18
Level 3

Likes

19 likes

Total Posts

29 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
Partha18
Level 3

25-12-2018

Hi,

For example, I have an existing schema with 10 data in it. one of the attribute is "rank"

<attribute label="rank" name="rank" type="long"/>

Now i want to assign default value for rank as "3" where there is no value in it. (means rank as "3" for existing values where rank is null or 0 and rank as 3 for future updating data where rank will be blank)

So if i make change as  <attribute label="rank" name="rank" type="long" sqlDefault="3"/> , all the existing values became "3". But i need null or 0 values to become 3.

so what should i need to do?

Thanks in advance,

ParthaSarathy.

View Entire Topic

Avatar

Avatar
Validate 10
Level 3
Partha18
Level 3

Likes

19 likes

Total Posts

29 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
Partha18
Level 3

Likes

19 likes

Total Posts

29 posts

Correct Reply

2 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
Partha18
Level 3

26-12-2018

1654847_pastedImage_0.png

i am getting this error when i tried to update database structure..