12,282 reputation
11948
bio website
location Munich
age
visits member for 3 years, 5 months
seen 22 mins ago

Oct
16
comment Oracle Concurrent Insertion
Session2 will not hang. Why don't you just try for yourself? This is really easy to test
Oct
15
comment postgresql replace table without losing dependancies
I have never seen a create or replace table in any other DBMS (Oracle, SQL Server, DB2, Firebird, HSQLDB, ....)
Oct
15
comment postgresql replace table without losing dependancies
What's wrong with using ALTER TABLE?
Oct
14
comment Using if statement outside of a stored procedure or function
"Are if statements usable outside stored procedures?" - no
Oct
13
comment work with json in oracle
@drew: I know. This was intended to make Lloyd aware of the subtle difference between .0.2 and .0.1
Oct
13
comment Create a test enviroment in Oracle 10g
Look into the DataPump utility
Oct
13
comment work with json in oracle
@Lloyd: you need 12.1.0.2, the initial 12c release which was 12.1.0.1 did not contain support for JSON
Oct
13
comment Is there a way to store a PostgreSQL database directly on a block device (not filesystem)?
It doesn't really matter, but: why are you reading a manual from an outdated (and unsupported) Postgres version? Oracle is able to store its data on "raw" devices. But I don't see any advantage in that. Plus Postgres relies heavily on the cache of the underlying file-system. Using "raw" devices might have made a difference 20 years ago, but I don't think the filesystem is really a problem nowadays (especially with the number of alternatives to choose from)
Oct
13
comment What's wrong with my DDL statement?
I would start with the chapter "SQL commands" in the manual: mariadb.com/kb/en/mariadb/documentation
Oct
13
comment Is the runtime of checking for duplicate primary keys in SQL Server O(n)?
"In practice it is O(1) because the upper index levels tend to be cached" - the caching doesn't change the complexity. That will still be O(log N). The operations involved are faster, but it still requires the same number of operations.
Oct
12
comment What's wrong with my DDL statement?
What did you find when you checked the manual as suggested by the error message?
Oct
12
comment Is there a faster way to get UNION ALL behavior in Postgres?
I don't see a reason for the union all: select distinct on (t2_id) t1_id, t2_id from t0 will do just fine: sqlfiddle.com/#!15/d41d8/3591 Btw. the parentheses around the individual selects are totally useless for the union
Oct
11
comment How to order by Levenshtein distance?
What about using an order by soundex(name) for the window function?
Oct
11
comment How to order by Levenshtein distance?
The levensthein distance is calculated between the name of the "current" row and the name of the "previous" row, where "previous is defined by the order on the name.
Oct
11
comment How to create identity field in MySQL without using auto_increment column?
Just because some company is using a specific design doesn't mean it's a good design.
Oct
11
comment How to create identity field in MySQL without using auto_increment column?
"For example I can say the first 4 characters are the object id and the last 14 characters are the record identifier" - mixing different types of information in a single column is almost always a bad choice. Create three columns one with an autoincrement and make those three the primary key (or unique key). And Oracle does not have an "identifier type that does this trick"
Oct
10
comment What's the term that describes filtering query that makes use of indexes
@ypercube: but the query would need to reference the computed column, correct? So you would need to change the query, or does SQL Server rewrite the query when it detects that the expression is the same as the definition of the computed column?
Oct
10
comment What's the term that describes filtering query that makes use of indexes
Note that Postgres has an index type that can be used for the expression LIKE '%A%' but neither Oracle nor SQL Server can do that. And you can define an index in Oracle and Postgres that makes SUBSTRING(column, 1, 3) = 'abc' "Sargable"
Oct
10
comment Need Query for th problem in oracle
@miracle173: again see the manual docs.oracle.com/cd/E11882_01/appdev.112/e10765/…
Oct
10
comment Need Query for th problem in oracle
If you need this a lot, you could create your own aggregate function. That would probably be faster that your solution.