大约有 6,100 项符合查询结果(耗时:0.0271秒) [XML]
Postgresql - change the size of a varchar column to lower length
I have a question about the ALTER TABLE command on a really large table (almost 30 millions rows).
One of its columns is a varchar(255) and I would like to resize it to a varchar(40) .
Basically, I would like to change my column by running the following command:
...
How do you copy a record in a SQL table but swap out the unique id of the new row?
...es close to what I need, but my scenario is slightly different. The source table and destination table are the same and the primary key is a uniqueidentifier (guid). When I try this:
...
Convert Rows to columns using 'Pivot' in SQL Server
I have read the stuff on MS pivot tables and I am still having problems getting this correct.
8 Answers
...
Physical vs. logical / soft delete of database record?
...and you don't have to worry about cascading a delete through various other tables in the database that reference the row you are deleting. Disadvantage is that you have to code any reporting/display methods to take the flag into account.
As far as if it is a common practice - I would say yes, but ...
How to find foreign key dependencies in SQL Server?
... all Foreign Key Relationships within the current database.
SELECT
FK_Table = FK.TABLE_NAME,
FK_Column = CU.COLUMN_NAME,
PK_Table = PK.TABLE_NAME,
PK_Column = PT.COLUMN_NAME,
Constraint_Name = C.CONSTRAINT_NAME
FROM
INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS C
INNER JOIN INF...
Django South - table already exists
...
since you already have the tables created in the database, you just need to run the initial migration as fake
./manage.py migrate myapp --fake
make sure that the schema of models is same as schema of tables in database.
...
Create table using Javascript
I have a JavaScript function which creates a table with 3 rows 2 cells.
12 Answers
12
...
How to get the mysql table columns data type?
I want to get the column data type of a mysql table.
11 Answers
11
...
Error Code: 1005. Can't create table '…' (errno: 150)
...T(11) or TINYINT. You may want to confirm the field size using SHOW CREATE TABLE because Query Browser will sometimes visually show just INTEGER for both INT(10) and INT(11). You should also check that one is not SIGNED and the other is UNSIGNED. They both need to be exactly the same.
One of the key...
MySQL, update multiple tables with one query
I have a function that updates three tables, but I use three queries to perform this. I wish to use a more convenient approach for good practice.
...