Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
106 views

How do I protected my sensitive data (financial) from website/CRM programmers?

As a company owner, I need to protect my sensitive data from my website/CRM programmers. I know I can scramble DB values with a simple script but it needs to be applied manually all the time and when ...
abenci's user avatar
  • 123
4 votes
0 answers
1k views

How costly is changing column datatype in PostgreSQL?

I'm currently evaluating PostgreSQL for an app we are developing which comes with a weird usecase. We want to allow clients to create new fields which in turn will create new columns in a client-...
navinpai's user avatar
  • 141
0 votes
1 answer
2k views

Has the ID column configured as PK, NN and AI, be the first column on my table definition?

I have a .csv file with a bunch of data which I am using for load all the data into a DB table. The file lacks the ID column (because that's is an internal column managed through our software and they ...
ReynierPM's user avatar
  • 1,888
1 vote
1 answer
234 views

ALTER TABLE online by keeping data as BLOBs

Could you please explain me how extreme de-normalization (store the value as a serialized blob will help to ALTER TABLE online? source Additionally, it's crucial to be able to change the schema: ...
VB_'s user avatar
  • 407
7 votes
5 answers
17k views

Is it bad practice to add columns to an existing table?

Conversely: Is it better to get all the columns created at the time when a new table is created? I'm working on a new system and new requirements are coming up all the time. The latest requirement ...
Johan's user avatar
  • 623
1 vote
1 answer
60 views

Changing Key (PK, FK) properties in DROP/Add column statements

I want to change a table by adding a column. So far nothing to see here, BUT I would like to make this column part of a composite key, i.e., I now have a layout table_name( Field_1 datatype PK, ...
user89723's user avatar
11 votes
1 answer
7k views

Adding nullable column to table costs more than 10 minutes

I have problems to add a new column on a table. I tried to run it a couple of times, but after more than 10 minutes running, I decided to cancel the query because of lock time. ALTER TABLE mytable ...
Matthieu Verrecchia's user avatar
3 votes
1 answer
3k views

Apparantly errorneous Exceeds 8K row length message

In attempting to alter an SQL Server table adding DATE and FLOAT columns. I get a message: Warning: The table "CustomerTransactions" has been created, but its maximum row size exceeds the allowed ...
Yossi's user avatar
  • 133
7 votes
6 answers
70k views

How To change the column order?

How To change the column order in sql server 2008 R2? Eg: My table order is Eid------Ename-----Esalary Know i want this format like Eid---Salary----Ename Thanks.
user avatar
12 votes
2 answers
5k views

Fastest way to change a 600GB table indexed key datatype from INT to BIGINT

I need to change a datatype from INT to BIGINT in a 600GB MySQL table. The column has a unique index. I might be good with unsigned INT, but I assume changing to that or BIGINT will be pretty much ...
Noam's user avatar
  • 979
3 votes
2 answers
29k views

How to make a trigger that will compare input with a value of other table?

I had made two tables with the following fields: TABLE 1: "Bookings" FIELD: "fk_flight_number" FIELD: "date_of_reservation" TABLE 2: "Flights" FIELD: "flight_number" FIELD: "...
Don Angelo Annoni's user avatar
11 votes
1 answer
70k views

What happens when you modify (reduce) a column's length?

Lets say I have two columns of type NUMBER (without precision, and scale) and VARCHAR(300). I saw that these columns are way too large for my data, so I want to modify them to NUMBER(11) and VARCHAR(...
mnowotka's user avatar
  • 310
7 votes
2 answers
49k views

Add a new Column and define its position in a table

I have Table A with 5 columns: TableA -- Name Tel Email Address I want to add a new column (mobile) in between Tel & Email: TableA -- Name Tel Mobile Email Address If I use ALTER TABLE TableA ...
AmmarR's user avatar
  • 2,826
2 votes
1 answer
8k views

Default values in SQLite3

When I created the table structure of my SQLite database, I provided a DEFAULT value which is used when no value is provided by the user. Now, because the application code changed, I need to modify ...
Cannis Lupus's user avatar