Reputation
14,162
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
1 25 54
Newest
 Enlightened
Impact
~797k people reached

1d
comment Sharing PostgreSQL database on one dual-boot machine without duplication (cross-platform)
Data directories are not compatible between operating systems. This is not going to work
1d
comment Which terms are used to refer a row in database?
Yes, that's true
1d
comment Which terms are used to refer a row in database?
A row is a row. There is no other name for it. Some people use the term "record", but as Joe Celko put it: "Rows are not records; fields are not columns; tables are not files"
1d
comment Generate create table DDL from any arbitrary select query?
Which SQL client are you using? Maybe there is a feature in the client to do that.
1d
comment What is the recommended source control to use with PostgreSQL and SQLLite?
Check out Liquibase (or Flyway) and put the migration script into the version control system where you store your code
2d
comment Unable to create read only user— postgresql 9.4
Did you try to explicitly revoke the create privilege? revoke create on schema public from user1. Btw: your example revoke is invalid and won't run because it's revoke ... from ... not revoke .. to ...
2d
comment PostgreSQL: raise error if planner needs to do an sequence scan
"When is a seq scan a good plan if the table has more than 10M rows" - select customer_id, avg(order_amount) from orders group by customer_id for starters or any query that needs more than approximately 15% of the rows
2d
comment PostgreSQL: raise error if planner needs to do an sequence scan
I agree with Colin. It is a common misconception that a seq scan is a (always) bad thing.
2d
comment Insert date values in a created table
'0000-00-00' is an invalid date. If you don't have a value, then just store NULL. Also: which DBMS are you using?
Apr
15
comment dbms_datapump API exclude statistics during import
@Colin'tHart: actually this answers my question perfectly ;) Works like a charm
Apr
15
comment Call function where argument is a (sub)select statement
I think you need an extra pair of parentheses: SELECT * FROM test_function((SELECT customerid FROM tableX where id = 1))
Apr
15
comment Mathematical equality of two SQL statements
@BuahahaXD: that's not true. select * from foo where id = 4 will most certainly have the same execution plan as select * from foo where id = 2
Apr
14
comment SQL User Permissions for Continuous Integration via TeamCity
Added sql-server tag based on the mentioning of sqlcmd
Apr
14
comment conversion failed when converting the varchar value 'JENNIFER FALCONER
Always add the tag for the DBMS you are using. Postgres, Oracle, ...
Apr
14
comment conversion failed when converting the varchar value 'JENNIFER FALCONER
You mean appearance is a varchar - customer is a table.
Apr
14
comment Questions on joining tables
The WHERE agents.agent_code=orders.agent_code is the join predicate
Apr
14
comment Questions on joining tables
Yes, I know it works. My point was that there is no "cross join" there. It is an inner join - just an outdated way of writing it.
Apr
14
comment How can I use PostgreSQL's partial sum tree index (if it even exists)? Do any databases allow for use of such an index?
Details about Postgres' GiST implementation can be found here: postgresql.org/docs/current/static/gist.html to my knowledge Postgres is the only DBMS that allows you to "plug-in" your own index types through an extension.
Apr
14
comment creating BTREE index in oracle with clause
You can't create an index "on the fly like that". And "Considering WITH clause as a table" doesn't make sense at all. A common table expression (aka "WITH clause") is not a table.
Apr
14
comment Problem With update column in table
Please tell us which DBMS you are using. Postgres? Oracle?