How to change the default value and to alter a column in sql?

0 votes

I got an error while setting up a new default value and to alter a column's data type:

ERROR 1064 (42000): You have an error in your SQL syntax;

What can be the solution can anyone suggest?

Jun 21, 2019 in Big Data Hadoop by Daisy
45 views

1 answer to this question.

0 votes

Hi,

You can try this:

ALTER TABLE foobar_data CHANGE COLUMN col col VARCHAR(255) NOT NULL DEFAULT '{}';

It should work.

answered Jun 24, 2019 by Gitika
• 26,390 points

Related Questions In Big Data Hadoop

0 votes
1 answer

How to Modify the Maximum Number of Versions for a Column Family in Hbase?

Hey, The example uses HBase Shell to keep ...READ MORE

answered May 31, 2019 in Big Data Hadoop by Gitika
• 26,390 points
245 views
0 votes
1 answer

How to print the content of a file in console present in HDFS?

Yes, you can use hdfs dfs command ...READ MORE

answered Apr 19, 2018 in Big Data Hadoop by Shubham
• 13,380 points
1,081 views
0 votes
1 answer

How to change the replication factor of specific directory in Hadoop?

Yes, you can change the replication factor ...READ MORE

answered May 10, 2018 in Big Data Hadoop by Shubham
• 13,380 points
1,017 views
0 votes
1 answer
0 votes
1 answer

Want a command to be executed in Salt only if a directory is empty

You should consider using this inside your ...READ MORE

answered Jun 12, 2018 in DevOps Tools by Damon Salvatore
• 5,540 points
67 views
0 votes
1 answer

Creating A New MySQL User In Amazon RDS Environment

AWS RDS security groups documentation (a common ...READ MORE

answered Jul 18, 2018 in AWS by Priyaj
• 57,530 points
490 views
0 votes
2 answers

How to change the location of a table in hive?

Changing location requires 2 steps: 1.) Change location ...READ MORE

answered Feb 12 in Big Data Hadoop by Saksham Sehrawet
564 views
0 votes
1 answer

How to Change the maximum number of cells of a column family?

Hey, Given below is the syntax to change ...READ MORE

answered May 24, 2019 in Big Data Hadoop by Gitika
• 26,390 points
75 views