Tag Archives: SQL

SQL DB structure

Excellent link concerning the strategy, design and DB forming. Short and to the point explanation in a youtube tutorial. Primary Key Each table should have a column (or a set of columns), called primary key, that uniquely identifies every records … Continue reading

Posted in WIN | Tagged , , | Leave a comment

Creation of a MS SQL test DB and DB security

Opšte stavke : You can do only three things with any database object, other than actually use it; you can create it, alter it, or drop it to get rid of it. Unless permissions are explicitly assigned, only members of … Continue reading

Posted in WIN | Tagged , , , | Comments Off on Creation of a MS SQL test DB and DB security

SQL query by using MS SQL SMS (1)

Before writing a query you should point it to a certain DB (By default it is DB master). There are two ways to do this : 1. 2. Type inside the query (first line) : USE your-DB-name

Posted in WIN | Tagged , | Comments Off on SQL query by using MS SQL SMS (1)

SQL for beginners, SQL 2008 installation on WIN 2012 R2

So my new job 🙂 I should learn SQL. And since I am a total tabula rasa (for SQL), this is for total beginners 😉 SQL is a language for accessing databases. It can add tables/rows/columns, data, and do queries. … Continue reading

Posted in WIN | Tagged , , | Comments Off on SQL for beginners, SQL 2008 installation on WIN 2012 R2

SQL query to another server

How to send a query to another server, while being attached to the first server? There are two ways, from MSSQLSMS (Microsoft SQL Server Management Studio) : 1) Servers are linked : 2) Under MSSQLSMS all the servers we wish … Continue reading

Posted in WIN | Tagged , , | Comments Off on SQL query to another server

SQL query : computer name

1) How to get computer name using SQL query : select ServerProperty(‘ComputerNamePhysicalNetBIOS’); 2) And some additional info concerning SQL : select ServerProperty(‘ComputerNamePhysicalNetBIOS’),ServerProperty(‘Edition’); 3) Product version : select ServerProperty(‘ComputerNamePhysicalNetBIOS’),ServerProperty(‘MachineName’),ServerProperty(‘Edition’),ServerProperty(‘ProductLevel’); Nore : first two items usually give the same output, so I … Continue reading

Posted in WIN | Tagged , , | Comments Off on SQL query : computer name

SQL query : CPU and RAM that DB uses

Query depends on the SWL server version that is being queried. Query should always be done on “master” DB, soa s to gain data for the whole server : The data gained from sys.dm_os_sys_infodepend on the SQL server version (link) … Continue reading

Posted in WIN | Tagged , , , | Comments Off on SQL query : CPU and RAM that DB uses

SQL queries

I am starting to work a bit with MS SQL. Up until now all I have done were some small MySQL queries. Good link for beginners, like me. ***** A few things to begin with : SQL stands for Structured … Continue reading

Posted in WIN | Tagged , | Comments Off on SQL queries