Search
 
SCRIPT & CODE EXAMPLE
 

SQL

declare variables sql

--      name         type               value
DECLARE @PersonId AS UNIQUEIDENTIFIER = 'ddb7bfff-9ce8-4651-6973-08d9a46c90b6'
Comment

sql declare table variable

DECLARE @TABLE TABLE( COL1 INT, COL2 VARCHAR(30))
Comment

sql declare variable

DECLARE @datecurrent datetime2
set @datecurrent = CAST(getdate() AS smalldatetime)
Comment

declare table variable sql

DECLARE @TableVariable TABLE (Id INT)

INSERT INTO @TableVariable
SELECT Id
FROM TableName
WHERE....

SELECT *
FROM TableName
WHERE Id IN ( SELECT Id FROM @TableVariable)
Comment

how to declare a variable in sql

DECLARE @COURSE_ID AS INT, @COURSE_NAME VARCHAR (10);
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql cashing error 
Sql :: sql compare two tables for differences 
Sql :: select if then postgresql 
Sql :: sql server locks 
Sql :: enable constraint in sql 
Sql :: how to change a column name in postgresql 
Sql :: oracle create table if not exists 
Sql :: to date oracle 
Sql :: 3 days back in sql server 
Sql :: create sequence postgres 
Sql :: alter schema sql server 
Sql :: select first and last row sql 
Sql :: update query with between in mysql 
Sql :: create index mysql 
Sql :: how to drop all tables in sql 
Sql :: sql create view 
Sql :: how to combine first and last nae into one columb sql 
Sql :: split string from comma in sql 
Sql :: drop primary key oracle 
Sql :: how to drop function in sql 
Sql :: copy value from one column to another postgres 
Sql :: sql server convert date to weekday 
Sql :: how to select distinct in mysql 
Sql :: db.relationship sqlalchemy flask 
Sql :: postgresql delete limit 
Sql :: SQL UNION ALL Operator 
Sql :: sql query for getting data with join and count 
Sql :: create table in mysql mariadb primary key foreign key 
Sql :: how to get the date diff of 2 dates in the same fieldin sql server 
Sql :: orcale index size 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =