Questions tagged [alter-table]

The "ALTER TABLE" is a SQL statement that allows you to make schema changes to a database table (i.e. add, drop or alter columns from an existing table).

1118 questions
-2
votes
1 answer

I'm having issues with the ALTER TABLE function

I'm attempting to use the tables trip, guide and reservation in order to make a normalized table. I'm getting the error "ORA-00933: SQL command not properly ended." I'm not certain what is wrong with ALTER TABLE. SELECT trip.TRIP_ID, trip.State,…
MPimentel
  • 3
  • 5
-2
votes
1 answer

How to Alter Table column to Collection in PL/SQL?

I want to store value in column of table as list (Nested Table or Table). How can i do it ?Thank for your help ! I'm use Oracle Database (PL/SQL) and my IDE is SQL developer.
-2
votes
4 answers

ALTER TABLE Parse error: syntax error, unexpected T_STRING

i have a bit of a problem this is my code ` if(isset($_POST['delete'])) { $host="db1.xhost.ro"; // Host name $username="supremesguild_01"; // Mysql username $password="Blizzard951234"; // Mysql password …
CoAmA
  • 1
  • 4
-3
votes
1 answer

How to alter a table in large mysql DataBase

I have very large mysql DB(more than 100 G) and I want to migrate some changes in table. It need to posing that I have no space to make backup for this size, as results, it rolls back all changes. In clear way, when I want to alter table in mysql,…
JBidad
  • 1
  • 3
-3
votes
4 answers

How to alter an already created table to drop and re-create the primary key?

I have this table: Create table Product ( [Id] int primary key not null, [Name] varchar (250), [Price] money ) The table is already created, and now I want to make [Name] primary key with [Id]. I don't want to re-create the table,…
-4
votes
2 answers

what if length attribute is not defined in hibernate mapping file, what will be the default value for a column then?

What will happen if i do not define length attribute in my hibernate mapping hbm.xml file? what is the default length value it will take for that column? Thanks
Danish
  • 189
  • 2
  • 3
  • 14
-4
votes
1 answer

How to use T-SQL to properly add new columns

I am getting started with T-SQL in Visual Studios 2013 and I was wondering how can you add new columns to an existing database table? I have this snippet ALTER TABLE [dbo].[Articles] ADD COLUMNS TenLatMin FLOAT NULL, TenLatMax FLOAT …
user1949387
  • 1,245
  • 3
  • 21
  • 38
-6
votes
4 answers

Stop allowing null in a table column

I have a table in SQL server 2008. I need a column that until now wasn't necessary, not to allow NULL anymore, without droping the table. I tried to do something like this: ALTER TABLE [Sessions] ALTER COLUMN region_id NOT NULL; EDIT: It was a…
Tomer Amir
  • 1,515
  • 4
  • 27
  • 54
1 2 3
74
75