Category: Oracle

  • Executing sql scripts using command line tools

    SQL Server 2005 has a command line tool named sqlcmd. MySQL has a command line tool named mysql. Oracle has a command line tool called sqlplus. They can all be used for interactive query processing and batch scripts processing. They do similar things, albeit in different ways. They are functionally equivalent. For SQL Server 2005, […]

  • desc is sp_columns in Sql Server

    In Oracle and MySql, to get the column name and data type of a table, you can use: desc MyTable or describe MyTable The equivalent of desc in Sql Server is sp_columns. Therefore, run the command below will get similar results: sp_columns MyTable

  • Defining NO ACTION foreign key constraints in Oracle

    In both Oracle and Sql Server, when creating a foreign key constraint on a child table, the default option is NO ACTION, meaning that this constraint will prevent the deletion or update of a parent key if there is a row in the child table that references the key. One popular option is CASCADE, meaning […]

  • Connect to a different database server within command line utility

    In sqlcmd, you can connect to a different server by this command: :connect MyServer The above command will attempt to use integrated / Windows Active Directory authentication. To use traditional Sql Server authentication, use this instead: :connect MyServer -U MyLogin You can do the same kind of thing in Oracle Sql Plus by using this […]

  • Don’t over do it, Sql Server; Watch out, Oracle

    SQL Server 2005 was released in November, 2005. I actually played with it much earlier than that. Overall, I am pretty happy with it. I think it is a great product, and will give Oracle’s namesake RDBMS a run for its money. Previously, there were a lot of arguments against Sql Server for its perceived […]