'alter' is a SQL keyword used to change or modify the table structure or the records in a table.
Questions tagged [alter]
835 questions
-1
votes
1 answer
Edit MySQL table in a Symfony project hosted [SOFTACULOUS]
I'm coding a Symfony project and I should host it on a server that make me install Symfony by Softacolous (I can't use a shell). So, I can't understand how make an edit on the online DB.
Can you help me?

ProtoTyPus
- 1,272
- 3
- 19
- 40
-1
votes
1 answer
MySQL ALTER TABLE ORDER BY f1 DESC - Does this block SELECT queries?
I have a MySQL MYISAM table (say tbl) consisting of 2 unsigned int fields, say, f1 and f2. There is an index on f2 and the table is very large (approximately 320,000,000+ rows). I update this table periodically (with approximately 100,000 new rows a…

Tim
- 71
- 1
- 1
- 3
-1
votes
1 answer
alter view in SQL DB2, adding new column
I have created a view orderedView by ordering by series and values looking like this:
series | values
1 | 1
1 | 3
1 | 5
1 | 6
2 | -1
2 | 0
2 | 4
2 | 5
Now I would like to add a third column to…

mabu
- 45
- 3
- 9
-1
votes
2 answers
How to re-order a table with a certain value at the top
For example, I have a table like this:
id
|02|
|01|
|03|
|05|
|04|
I need to alter the table with 05 at the top:
id
|05|
|01|
|02|
|03|
|04|
SELECT * FROM table1 ORDER BY id=05 desc,id works. But I want to alter the table.
ALTER TABLE table1 ORDER…

Red Romanov
- 454
- 5
- 11
-1
votes
1 answer
Mysql - alter table
I want to add new column in my table with date, but I want to give value 000-00-00 in timestamp format to existing record and current_timestamp to new records. Is it possible? how?

Mateusz Chudy
- 45
- 1
- 8
-1
votes
2 answers
Can i drop a column of a table in SQL server which is having a non clustered index defined on it
I have a table with huge record count . Some of the columns have a non clustered indexes defined on them .
we are required to alter/drop few columns which are having such indices defined.
I have directly alter/dropped the columns , but did not get…

Sai Avinash
- 4,683
- 17
- 58
- 96
-1
votes
1 answer
Picking out specific values from a group in MySQL
This seems like such a simple problem, but I can't find a good solution. I'm trying to select information from a slightly misformatted table. Basically, wherever sequence=0, the person_id should actually be a company_id. This company_id then…

Rachie
- 433
- 1
- 6
- 17
-1
votes
2 answers
UPDATE sql table value of the currently logged in user?
I have this page with a login system, and a point system. Everytime a user completes a task, he or she will recieve +5 points. Now, how do I UPDATE the value of point in my database of the currently logged in user?
I know I can do UPDATE table SET…

metadog
- 17
- 1
- 5
-1
votes
2 answers
ALTER TABLE ADD AFTER works in SQL query but not in PHP
When I run SQL query in phpMyAdmin directly it works; however, running the same query from PHP file does not affect the database table and no errors are thrown also.
ALTER TABLE tender_230115 ADD avt DECIMAL(10,2) NOT NULL AFTER vpm
PHP Version…

Snowman
- 17
- 1
- 8
-1
votes
2 answers
change text of link onClick
How do I toggle the text of this link
Re-Arrange
between 'Re-Arrange' and 'save' onClick

Vivek Tripathi
- 267
- 1
- 4
- 12
-1
votes
1 answer
ALTER postgreSQL sequence
I am quite very new to postgreSQL. I am have a sequence which starts from 1 by default. What I am looking for is that if I want to move my next value, which is now 87, to 2000. I am unable to do that. Can any one suggest me how to go about doing the…

Dilip Basnet
- 1
- 2
-1
votes
1 answer
MYSQL syntax error on column alter
i am trying to convert some Oracle sql cods to mysql, i got an issue here
ALTER TABLE RPT_ERRORLOG ALTER RUNDATE SET DEFAULT NOW();
it is showing an error 1064 like below
1 queries executed, 0 success, 1 errors, 0 warnings
Query: ALTER TABLE…

John
- 666
- 1
- 9
- 22
-1
votes
6 answers
i need an SQL query to alter the output result
I want to alter the data on output
--------------------------------------
| Name | Phone | Address |
--------------------------------------
| Suwaid 068 | 7658945621 | 23/2 Myf |
| Akbar 0525 | 7658945621 | 23/2 Ngh |
| Shah …

Suwaid
- 1
- 1
-1
votes
2 answers
What is wrong in this PDO query to ALTERing my TABLE with a new column?
I am trying to add a new column to a table with a set date as the column head and a tinyint(1) as the datatype
function addAttendance($date) {
include('connection.php');
$column_name = strtolower($date);
…
-1
votes
1 answer
Alter all id´s in a database
I have a database whose ID rows are all called "ID". I need to change all of them to "ID_[name of the table"] and change every foreign key relating to those changed ID rows.

user1569154
- 19
- 1
- 5